Home page error: Strict warning: Only variables should be passed by reference in deco_preprocess_page() (line 98 of \sites\all\themes\deco\template.php).
Add content error: Strict warning: Only variables should be passed by reference in include() (line 10 of \sites\all\themes\deco\page.tpl.php).

Comments

c31ck’s picture

Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

Thank you for reporting this issue. I'm unable to reproduce the warnings, could you please provide clear steps to reproduce this issue?

Heine’s picture

Status: Postponed (maintainer needs more info) » Active
  $vars['primary_menu'] = str_replace('class="menu"', 'class="links primary-links"', render(menu_tree(variable_get('menu_main_links_source', 'main-menu'))));
  $vars['secondary_menu'] = str_replace('class="menu"', 'class="links secondary-links"', render(menu_tree(variable_get('menu_secondary_links_source', 'secondary-menu'))));

render() needs a reference. As menu_tree doesn't return a reference, this construct is invalid.

The solution is to assign the return value of menu_tree to a variable, then call render($variable).

See http://www.php.net/manual/en/language.references.pass.php

c31ck’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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