Comments

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
StatusFileSize
new831 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.

Worked! Thanks!

StatusFileSize
new4.26 KB

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

StatusFileSize
new4.25 KB

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

This is fixed on DRUPAL-6--3.

Next release will be from that branch.

Thanks for the patch!

Subscribe

StatusFileSize
new4.58 KB

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

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.

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
  return;
}

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

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?

StatusFileSize
new7.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

StatusFileSize
new4.54 KB

There is a rerolled patch file.

StatusFileSize
new4.53 KB

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