mr.baileys’s picture

Version: 6.x-2.5 » 6.x-2.x-dev
Priority: Major » Normal
Status: Active » Needs review
Issue tags: +Quick fix, +PHP 5.3 compatibility
831 bytes

I can confirm the bug, and victorcoder's approach is the correct one: since $methods and $vars are objects and objects are always passed by reference, there is no need to prefix the those parameters with the reference sign, and doing so will throw a warning on PHP 5.3.

The patch did not apply though, since it wasn't rolled from the module's root. Re-rolled patch attached.

jduhls’s picture

Worked! Thanks!

John Franklin’s picture

4.26 KB

Here is a similar patch to update all the submodules as well. Created against 6.x-2.5.

John Franklin’s picture

4.25 KB

Oops... didn't get the &$vars in the last one. Re-rolled.

Stuart Greenfield’s picture

This is fixed on DRUPAL-6--3.

Next release will be from that branch.

Thanks for the patch!

dmakaridze’s picture


Volx’s picture

You missed one method (imagerotator_wijering_imagerotator_swftools_playlist()). I re-rolled the patch with that.

ticici’s picture

Version: 6.x-2.x-dev » 6.x-2.5

thnx! I've just experienced the same warning and can confirm that its gone with installing 6.x-3.0-beta5.

3dloco’s picture

Patch works great for me too. I also found another one (not in the current patch) with &$method, &$vars that throws an error but only sometimes....

 *   String of text that be written to the xml file defining the playlist.

function flowplayer3_flowplayer3_mediaplayer_swftools_playlist($xml_data, &$method, &$vars) {
  // For FlowPlayer3 return nothing and let the handler create an empty xml file


as stated in the comments above, removing the & for $method and $vars resolves the issue.

ñull’s picture

So if I understand right, with the patches applied it won't work with php 5.2 any more? By the looks of this you would need a php 5.2 and 5.3 branch then?

EugenMayer’s picture

7.67 KB

those patches aren't complete at all. $vars need to be called by ref, as it gets manipulated. as we forked swftools more then a year ago (due its not maintained anymore), i cannot provide you a proper patch, but more or less it looks like the one attached

somersoft’s picture

There is a rerolled patch file.

somersoft’s picture

Here is the patch again, whith changes for the third parameter. :(