Using PHP 5.3.2 I'm seeing the following error when choosing an existing image via IMCE:

  • ulwarning: Parameter 1 to filefield_validate_associate_field() expected to be a reference, value given /path/filefield_sources/filefield_sources.module on line 317.
  • warning: array_merge() [function.array-merge]: Argument #2 is not an array in /path/filefield_sources/filefield_sources.module on line 317.
  • warning: array_merge() [function.array-merge]: Argument #1 is not an array in /path/filefield_sources/filefield_sources.module on line 317.
  • warning: array_merge() [function.array-merge]: Argument #1 is not an array in /path/filefield_sources/filefield_sources.module on line 317.
  • warning: Parameter 1 to filefield_validate_is_image() expected to be a reference, value given in /path/filefield_sources/filefield_sources.module on line 317.
  • warning: array_merge() [function.array-merge]: Argument #1 is not an array in /path/filefield_sources/filefield_sources.module on line 317.

Despite this error the module still works.

Versions:

- Drupal 6.17
- FileField 6.x-3.7
- IMCE 6.x-2.0-beta3
- FileField Sources 6.x.1.1

Related to #615862: Call-time pass-by-reference has been deprecated but instead it's expecting a reference.

Relevant Filefield issue: #755558: filefield_validate_associate_field generates a "ref needed value given" error with PHP 5.3

CommentFileSizeAuthor
#1 filefield_sources_843152.patch554 bytestwod

Comments

twod’s picture

Status: Active » Needs review
StatusFileSize
new554 bytes

This simple patch made it go away for me in PHP 5.3. Didn't have PHP 5.2 to test with.

quicksketch’s picture

Looks like this should work on all installations of PHP, at least with PHP 5 and higher (which is required for FileField anyway).

blackdog’s picture

Status: Needs review » Reviewed & tested by the community

Seems to work just fine with PHP 5.2 as well.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -PHP 5.3 compatibility

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