Drupal 6.15 & Epublish 6.x-1.4

Experienced the following warnings:

    * warning: Parameter 1 to theme_epublish_topics() expected to be a reference, value given in /Library/WebServer/Documents/drupal-6.15/includes/theme.inc on line 617.
    * warning: Parameter 1 to theme_epublish_pub_page() expected to be a reference, value given in /Library/WebServer/Documents/drupal-6.15/includes/theme.inc on line 617.
    * warning: Parameter 1 to theme_epublish_edition_reference() expected to be a reference, value given in /Library/WebServer/Documents/drupal-6.15/includes/theme.inc on line 617.

Made some changes to the code to avoid warnings. It seems those functions don't need parameter 1 to be a reference. Please review.

Comments

dooug’s picture

StatusFileSize
new1.75 KB

Here is the patch:

dooug’s picture

StatusFileSize
new1.92 KB

Oops! Ignore the last patch. Use this:

dooug’s picture

Title: warning: Parameter 1 to theme_epublish_topics() expected to be a reference » warning: Parameter 1 to theme_epublish_XXX() expected to be a reference & /epublish/# is blank
StatusFileSize
new2.28 KB

Found more warnings at /admin/epublish/add/topic

warning: Parameter 3 to theme_epublish_topics() expected to be a reference, value given in /Library/WebServer/Documents/drupal-6.15/includes/theme.inc on line 617.
warning: Parameter 2 to theme_epublish_pub_page() expected to be a reference, value given in /Library/WebServer/Documents/drupal-6.15/includes/theme.inc on line 617.

Applying this attached patch cleared up all the warnings like above. It also cleared up another issue I was having with the /epublish/# pages displaying as a blank white page. I still need to test some more, but from the looks of it, those parameters did not need to be passed by reference. Please review! I hope this helps someone.

jerdiggity’s picture

Assigned: Unassigned » jerdiggity
dooug’s picture

I've been discovering many similar issues and have realized it is because I have Drupal installed with PHP 5.3. This is discussed in the following issue:
#360605: PHP 5.3 Compatibility

I am unsure what changes will be made to Drupal core. It probably would be good to review the patches I submitted, and get the module to be PHP 5.3 compatible.

jerdiggity’s picture

Status: Needs review » Fixed

Committed to HEAD / 6.x-1.5 released -- thank you very much for your help!

jeremy

Status: Fixed » Closed (fixed)

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