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.
Comment | File | Size | Author |
---|---|---|---|
#2 | biblio-non_variable_passed_by_reference-2680409-2.patch | 1.11 KB | szeidler |
|
Comments
Comment #2
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedPatch attached that fixes the warning.
Comment #3
jrearickWe 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.
Comment #4
Alan D. CreditAttribution: Alan D. commentedanother rtbtc from me
Comment #6
Liam Morland