Closed (fixed)
Project:
Ubercart Terms of Service
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2012 at 07:46 UTC
Updated:
26 Mar 2012 at 19:10 UTC
Hi,
The full message is :
Strict warning : Only variables should be passed by reference in uc_termsofservice_general_form() (line 131 in /home/mywebroot/www/drupalsubfolder/sites/all/modules/uc_termsofservice/uc_termsofservice.module).
I found a fix in uc_termsofservice_general_form() line 131 in uc_termsofservice/uc_termsofservice.module :
OLD CODE
if ($node) {
$form['tos_text'] = array(
'#markup' => drupal_render(<strong>node_view($node, 'teaser')</strong>),
);
$form['tos_agree'] = array(
--->
NEW CODE
if ($node) {
$nodevw = node_view($node, 'teaser');
$form['tos_text'] = array(
'#markup' => drupal_render($nodevw),
);
$form['tos_agree'] = array(
I hope this helps.
Comments
Comment #1
FranckV commentedBy the way : great module thanks !!!
Comment #2
tr commentedI assume you're using PHP 5.4, which is why you see E_STRICT message?
I committed the above fix to -dev.
Comment #3
FranckV commentedHi TR, absolutely : not 5.4 but 5.3, nevertheless that is the same cause behind. Probably it is a good coding habit to take.
I recently moved to Drupal 7 and PHP 5.3 on a new server in the mean time. And I get a lot of such errors.
Thanks for the corrective action.