Download & Extend

warning: Parameter 1 to theme_epublish_XXX() expected to be a reference & /epublish/# is blank

Project:E-Publish
Version:6.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:jerdiggity
Status:closed (fixed)

Issue Summary

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

#1

Here is the patch:

AttachmentSize
epublish-699424-1.patch 1.75 KB

#2

Oops! Ignore the last patch. Use this:

AttachmentSize
epublish-699424-2.patch 1.92 KB

#3

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

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.

AttachmentSize
epublish-699424-3.patch 2.28 KB

#4

Assigned to:Anonymous» jerdiggity

#5

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.

#6

Status:needs review» fixed

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

jeremy

#7

Status:fixed» closed (fixed)

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

nobody click here