At the tail end of checkout, I'm seeing this error message:

Strict warning: Only variables should be passed by reference in commerce_webform_tokens() (line 53 of .../commerce_webform/commerce_webform.tokens.inc).

If you look at the code concerned:

foreach ($submissions as $id => $submission) {
            $node = $submission['node'];
            $sub = $submission['submission'];
            $details .= drupal_render(webform_submission_render($node, $sub, NULL, 'html')) . "\r\n";
          }

drupal_render() needs a variable to reference - see http://www.php.net/manual/en/language.references.pass.php

Patch to follow...

CommentFileSizeAuthor
#1 strict-reference-2258479-1.patch703 bytesrobcarr

Comments

robcarr’s picture

Status: Active » Needs review
StatusFileSize
new703 bytes

Patch attached. Simple solution stops the 'strict' errors

  $render = webform_submission_render($node, $sub, NULL, 'html');
  $details .= drupal_render($render) . "\r\n";
johnennew’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for this patch!

  • ceng committed c9c596f on 7.x-2.x authored by arrrgh
    Issue #2258479 by arrrgh, ceng: Strict Warning: Render variable
    
johnennew’s picture

Status: Reviewed & tested by the community » Fixed

Committed with thanks!

johnennew’s picture

Status: Fixed » Closed (fixed)

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