Closed (fixed)
Project:
Acidfree Albums
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Nov 2009 at 20:36 UTC
Updated:
3 Oct 2012 at 05:03 UTC
Has anyone else used acidfree on php 5.3.0? I updated to Fedora 12 which has php 5.3.0 and none of my acidfree albums display the pictures. When I'm viewing an album, the pager displays and any text, but not the images.
Comments
Comment #1
bkat commentedI should mention that this occurs for 6.x and 5.x.
Comment #2
rhylos commentedIf I recall this module is currently incompatible due to a feature that has been depricated in 5.3.x
Comment #3
bkat commentedDo you have any idea what that feature is? I'm happy to dig into the code and come up with fix but it would be helpful to get a headstart.
Comment #4
bkat commentedI've pretty much figured out what its going on. In D5, we have the following in class_album.inc
For whatever reason the theme call is not invoking theme_acidfree_print_thumb_acidfree or theme_acidfree_print_thumb_image for example. if I change it so that we invoke it as
Then the method gets invoked and everything displays like I'd expect. I poked around inside of theme() and it looks like it uses call_user_func_array() to invoke the appropriate function. So I replaced the above code with
and the function is not invoked. What gives? Why is call_user_func_array behaving differently when running under php 5.3.0?
Comment #5
berdirTheme function *must not* recieve params by reference. That did never work (it was simply forced to be by value) and since 5.3, it shows a warning and sets the problematic parameter to NULL.
To fix it, simply remove all "&" from theme function definitions.
Comment #6
mwheinz commentedComment #7
mwheinz commentedFixed in Beta2
Comment #9
texas-bronius commentedFyi, @Berdir means that, for instance, in ./acidfree/class_image.inc
in the D5 dev version should become
Just cmd-F for "function theme" and see if there are any preceding &'s. Same for class_album.inc.
Symptoms on my end: I had upgraded a vps from PHP 5.2 to 5.3, quick-scanned all sites, but failed to notice (or maybe cache-clear hadn't occurred..??) that this old D5 website's Projects gallery was totally blank! Content was still there. Googling error led me to this issue queue. Resolution is as @Berdir wrote.
Cheers
-Bronius