When editing an image in media gallery beta3 with a newly setup standard D7.0 I get this:

Strict warning: Only variables should be passed by reference in file_styles_strstr() (line 61 of /var/www/demo.0x8.net/drupal-7.0/sites/all/modules/styles/contrib/file_styles/file_styles.module)

Using media-beta3, styles-alpha-4, multiform-beta1

Best regards,
Ao

CommentFileSizeAuthor
#7 styles-1030930-7.patch824 bytescodycraven
#5 styles-1030930.patch802 bytespivica

Comments

Aonoa’s picture

This warning changed to line 64 with styles-alpha5.

Best regards,
Ao

Aonoa’s picture

Title: Strict warning: Only variables should be passed by reference in file_styles_strstr() (line 61 » Strict warning: Only variables should be passed by reference in file_styles_strstr() (line 64
Project: Media Gallery » Styles
Version: 7.x-1.0-beta3 » 7.x-2.0-alpha5

This also happens when simply adding media to my Media Gallery.

Best regards,
Ao

Aonoa’s picture

Actually, the warning is displayed both before I open my gallery and when I open my gallery it is displayed once for each media in it. Using PHP 5.3.5.

Best regards,
Ao

rmarius’s picture

Priority: Normal » Major

+1 Same problem

pivica’s picture

Status: Active » Needs review
StatusFileSize
new802 bytes

Here is a patch against latest dev version.

Aonoa’s picture

The patch in #5 works for me, thank you. :-)

Best regards,
Ao

codycraven’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new824 bytes

The patch attached is functionally identical to the patch in #5. Uses list() instead of array_shift(). Personal preference of the maintainers can be used to decide between options.

codycraven’s picture

Note other options of how this could be done (identical to #5 except for the return statement):

return $exploded[0];

or

return reset($exploded);

I don't really care which option is chosen, and I'm sure there are more than what has been provided. We just need this patched.

aaron’s picture

Version: 7.x-2.0-alpha5 » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

committed, thanks pivica & codycraven!

Status: Fixed » Closed (fixed)

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