Problem/Motivation

When logging and displaying strict PHP warnings, I encountered a non-variable, that was passed by reference in theme_biblio_long()
That resulted into the following warning:

Strict warning: Only variables should be passed by reference in theme_biblio_long() (line 168 of /sites/all/modules/contrib/biblio/includes/biblio_theme.inc).

The problem is similar to the one described and fixed in https://www.drupal.org/node/1760736.

Proposed resolution

Save the renderable array generated by field_view_field() in a variable.

In addition to it, everyone using the theme_biblio_long() for an theme overwrite, should check, if his theme overwrite also creates the strict warning.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

szeidler created an issue. See original summary.

szeidler’s picture

Status: Needs work » Needs review
FileSize
1.11 KB

Patch attached that fixes the warning.

jrearick’s picture

Status: Needs review » Reviewed & tested by the community

We ran into the same issue. As soon as we added body content to a biblio content, we got this error and I came up with the same solution as szeidler. Checking out the 7.x-1.x branch still shows the problem. Applying the patch above fixes the issue for me.

Alan D.’s picture

another rtbtc from me

Liam Morland’s picture

Title: Non-variable passed by reference in theme_biblio_long() » Remove non-variable passed by reference in theme_biblio_long()
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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