Argument #1 is not an array in pods/core/Pod.class.php on line 695

0

Hi. I erm... screwed something up somehow. I was playing with input/display helpers (i think it should be mention that input helpers did nothing to $value, it was just checking amount of words) with the link column - i wanted to have complex automatic link systems that would replace links text with four logos depending on link content. Firstly, links column was just a single-line text, then i've changed it into the code, then - into paragraph text (it actually was my fault - i thought that my helper couldn't get $value from code, while i just misspelled a letter). After everything got working i've tried to add one more link to see if the link limit is working - and now instead of input field i have the next message:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [address]/wp-content/plugins/pods/core/Pod.class.php on line 695

Under this is a link field, transformed into dropdown menu without any options inside. Nothing happened when i've changed column type or even deleted and recreated links column. Lines 692-696 of pod.class.php are so:

                    // Replace field attributes with public form attributes
        if (!empty($attributes) && is_array($attributes[$key]))
        {
            $field = array_merge($field, $attributes[$key]);
        }

There is no valuable information inside this columns, i just want to clean it properly somehow.

asked Jun 30 '10 at 2:01

Fike

208

edited Jun 30 '10 at 2:02

add comment
enter at least 15 characters

7 Answers

1

Please provide the code you are using for your Input Helper, as well as other any other related functions like publicForm if you're using that.

answered Jul 1 '10 at 7:10

sc0ttkclark

2936

add comment
enter at least 15 characters
1

Yeah, it should be fine if you removed the pod.

If you haven't already, creating a separate development site is always a good idea. That way, you'll be able to play around more with PHP without worrying about all your data getting lost.

answered Jul 8 '10 at 12:06

logikal16

249

add comment
enter at least 15 characters
0

Oh crap. I was so wrong when i said it was doing nothing to the $value:

<textarea class="<?php echo $css_classes; ?>" id="<?php echo $css_id; ?>">
<?php
$array=explode(' ', $value);
$num=count($array)-1;
$value=implode($array, ' ');
echo htmlspecialchars($value);
?>
</textarea>
<?php if ( $num>4 ) echo '<font color="red">Too many links, only first five will be processed</font>'; ?>

looks like i forgot to delete line "$value=implode($array, ' ');" because there is no sense in it.

I don't use publicForm, but i can provide all other codes (though none of them was designed for saving pod data).

answered Jul 1 '10 at 8:55

Fike

208

add comment
enter at least 15 characters
0

Is it dangerous to upgrade / what actions with damaged Pod and/or other Pods shouldn't be dangerous in this situation? (I actually got the same warning when i've deleted column from other pod, but when i recreated it, the warning has gone).

What will happen if i'll delete a pod like this? I mean, i can easily restore all data, if all the problem is improperly stored column and if it can be just deleted with the pod - this would be a solution.

answered Jul 7 '10 at 3:25

Fike

208

add comment
enter at least 15 characters
0

I don't understand your question. The level of risk on your site depends entirely on how you code your site. If you hard-code a helper to use a specific pod, then delete that pod, there's no easy way for the plugin to "detect" that something will get messed up.

answered Jul 7 '10 at 6:45

logikal16

249

add comment
enter at least 15 characters
0

By "dangerous" i've meant risk of whole plugin / other pods crashing. I'm pretty new with php and i'm very afraid of doing something i don't know yet. I understand that worst thing that can happen is a crashed plugin, which i can reinstall through admin panel, but i'll need to restore all pods data then (i've backed up all necessary pods/helpers already).

So, i should just delete this pod and don't worry about anything?

answered Jul 8 '10 at 4:46

Fike

208

add comment
enter at least 15 characters
0

Gosh, last update. Everything is just fine!

The last question is - are there any restrictions of changing column type on the fly? Can i damage something if i'll change column type (for example) from date to code while there are existing pod items with filled-out date, or Pods will automatically convert data?

answered Jul 8 '10 at 2:58

Fike

208

edited Jul 9 '10 at 1:31

add comment
enter at least 15 characters