Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After I migrated my fields from D6 to D7 I get this in all my contents with user references on them:
Warning: array_filter() expects parameter 1 to be array, string given in _user_reference_potential_references_standard() (line 864 of /path/to/drupal/sites\all\modules\references\user_reference\user_reference.module).
Thanks.
Comments
Comment #1
jbeall CreditAttribution: jbeall commentedI am encountering this as well, in 7.x-2.0.
Based on just a few minutes of testing, this seemed to fix it:
http://drupal.org/node/1462976#comment-5866428
We'll see how this fix holds up.
-Josh
Comment #2
jfha73 CreditAttribution: jfha73 commentedThat worked for me.
Comment #3
HLopes CreditAttribution: HLopes commentedI think you just need to edit the field and save it. ( something missing in the migrate hooks? )
Something else is wrong earlier on the field configuration.
The problem is that one of the referenced user status is blocked ( 0 ), which means the option "blocked" never gets saved.
The array_filter needs to be rethinked, i guess...
Can be easily avoided by using a view to list the referenceable users.
Comment #4
jfha73 CreditAttribution: jfha73 commentedSorry to bother you again with this, but I tried to do this again and it's either I don't remember what I did before or it's just not working for me this time, so let me ask you, can you release a new dev version with the fix included, or a patch for it?
Thanks.
Comment #5
jfha73 CreditAttribution: jfha73 commentedNever mind, I figured it out again, but seriously a new dev file wouldn't hurt
Comment #6
firfin CreditAttribution: firfin commentedSame problem. But easily solved like HLopes wrote in #3
Just save the field configuration again. Problem solved.
You need to do this for every user reference field.
Comment #7
rfayDuplicate of #1462976: Warning: array_filter() [function.array-filter]: The first argument should be an array - Patch in #1462976-04: Warning: array_filter() [function.array-filter]: The first argument should be an array