When I updated FileField Module from Beta 1 to Beta 2, I got a warning below :

warning: array_shift() [function.array-shift]: The argument should be an array in /public_html/sites/all/modules/filefield/filefield.install on line 196.

Below is another update shows on the same page :

The following queries were executed
filefield module
Update #6102

    * No queries

Update #6103

    * UPDATE {content_node_field_instance} SET widget_type = 'filefield_widget' WHERE widget_type = 'filefield_combo'

fieldgroup module
Update #6006

    * No queries

Update #6007

    * DELETE FROM {content_group_fields} WHERE (field_name, type_name) NOT IN (SELECT field_name, type_name FROM {content_node_field_instance})

Does that mean it has some problem or not?

Thank you,

Comments

chrissearle’s picture

I got the same warning.

Line 196 is inside update 6102.

This change is to "Fix corrupted serialized data in the "data" column." - but I'm not sure what was corrupted or how to look at my database to see if I need to fix anything here.

excell’s picture

Same - subscribing...

dsy73’s picture

Subscribing

quicksketch’s picture

How many FileFields are you using on your site and how many files have you uploaded (just as an estimate)?

If you're not experiencing the problem in #402860: Fatal error: CCK data field not always unserialized, the error doesn't cause any harm.

droolpal’s picture

I also get this error

bgetkin’s picture

Subscribing

quicksketch’s picture

This update will probably be removed entirely in the next version of FileField. If you did get a warning, it's not a problem that has caused any change to data.

Instead of being fixed in FileField, yched has said that he will likely fix the corrupted data problem in the next version of CCK. See #407446: Per-Field to Per-Type Storage Corrupts Serialized Columns. Since CCK will fix the problem, I'll probably remove this update entirely from FileField, since it wasn't directly responsible for the data corruption problem to begin with.

quicksketch’s picture

Status: Active » Fixed

This update has now been removed entirely. It'll be fixed more comprehensively in CCK itself, now that we know what's causing the problem (see #402860: Fatal error: CCK data field not always unserialized).

A little FAQ on this Error:

Why did I get this error?

You got this error because the update did not properly set a variable to an empty array(). If there were no items in the array, you got the warning:

warning: array_shift() [function.array-shift]: The argument should be an array in /public_html/sites/all/modules/filefield/filefield.install on line 196.

What was this update trying to do?

It was trying to fix data that had been inadvertently serialized multiple times, as described in #402860: Fatal error: CCK data field not always unserialized.

Did this error corrupt my data?

No, it did not break your data. Chances are if you got this error it's because FileField didn't run any updates at all. However, there's also the possibility that FileField did not correct data that is currently stored incorrectly.

How do I run the update without the error? How's this getting fixed?

I've removed the update from FileField entirely, since we're now fixing the problem in CCK directly. The maintainers of CCK and I are working to fix the problem of corrupted data universally, since it affects more than just FileFields. See #407446: Per-Field to Per-Type Storage Corrupts Serialized Columns.

What do I do in the meantime?

I'm putting out a beta3 tonight to temporarily work around the problem in described in #402860: Fatal error: CCK data field not always unserialized. I'll post a patch containing the workaround in that issue shortly. After applying this patch (or installing beta3), FileField will manually correct the data every time it is loaded.

IrishGringo’s picture

I am also getting this error... but I have been having a related issue. My fupload is not working. I am getting 503 errors. The files get uploaded, but then the file seems to be stuffed in the trash.. so, I am hopingthat this update will fix it. if not... who knows.. its late.

wow... the update completely hosed my system... now I am getting:
Fatal error: Call to undefined function imagefield_widget_upload_validators() in /home/aj99biza/zzfsbo.com/sites/all/modules/image_fupload/image_fupload_imagefield/image_fupload_imagefield.module on line 491

I get this white screen when I am trying to create content.

quicksketch’s picture

vincyoumans: see #402876: Restore imagefield_widget_upload_validators. The image_fupload_imagefield.module you're using needs to be updated.

dsy73’s picture

Ok its just a warning in my case because I don't have any data:
"You got this error because the update did not properly set a variable to an empty array(). If there were no items in the array, you got the warning"
Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.