Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using the latest versions of Drupal and Aperture, even after flushing all caches, this message is displayed:
Strict warning: Only variables should be passed by reference in aperture_preprocess_page() (line 21 of D:\_x\Drupal_7_dev\sites\all\themes\aperture\template.php).
The server is running PHP 5.2.5, so that's up-to-date.
The line of code is:
$vars['primary'] = '<div id="primary-menu">' . drupal_render(menu_tree_output($tree)) . '</div>';
Changing that line to the following, resolves the problem:
$menu_tree_output = menu_tree_output($tree);
$vars['primary'] = '<div id="primary-menu">' . drupal_render($menu_tree_output) . '</div>';
Comments
Comment #1
bengtan CreditAttribution: bengtan commentedHi,
Fixed and committed. Thank you.
http://drupal.org/commitlog/commit/15754/0ff98887afe20ae7204bd9ee30e4fc4...
Comment #3
zandrsn CreditAttribution: zandrsn commentedHi, I realize that this is a very late reply, but I am having this same issue and the posted fix doesn't work for me. If edit line 21 in the template.php file as suggested it causes my whole site to stop loading and give error 500. Any ideas how I can fix this?
Until then all of my pages have this error:
Strict warning: Only variables should be passed by reference in aperture_preprocess_page() (line 21 of /home3/zandrsnc/public_html/drupal/sites/all/themes/aperture/template.php).