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!

CommentFileSizeAuthor
modr8-themeref-0.patch361 bytesalexiswatson

Comments

alexiswatson’s picture

Title: theme_modr8_form() wrongly expects a reference » theme_modr8_form() wrongly expects a reference (PHP 5.3)

Updated the title to make Googling for the solution easier.

mikejonesok’s picture

Thanks for the patch!

pwolanin’s picture

looks fine - that & must be cruft.

pwolanin’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Needs review » Fixed

committed to 6.x. thanks.

Status: Fixed » Closed (fixed)
Issue tags: -php-5.3

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

yesct’s picture

Issue summary: View changes
Issue tags: -php-5.3 +PHP 5.3