In PHP 5.3, viewing the posts in the moderation queue will produce the following, along with myriad formatting errors:
warning: Parameter 1 to theme_modr8_form() expected to be a reference, value given in /var/www/html/includes/theme.inc on line 617.
I normally don't advocate the standard approach of "just remove the ampersand" because of its tendency to break the API and cause unexpected results, but since the theming function doesn't (and shouldn't) manipulate the $form array or pass along the reference to anything that needs it, simply removing the & in the function definition fixes the problem nicely, allowing the form to render normally. The following trivial patch was tested in PHP 5.3; feedback welcome!
| Comment | File | Size | Author |
|---|---|---|---|
| modr8-themeref-0.patch | 361 bytes | alexiswatson |
Comments
Comment #1
alexiswatson commentedUpdated the title to make Googling for the solution easier.
Comment #2
mikejonesok commentedThanks for the patch!
Comment #3
pwolanin commentedlooks fine - that & must be cruft.
Comment #4
pwolanin commentedcommitted to 6.x. thanks.
Comment #7
yesct commented