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

bengtan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

zandrsn’s picture

Issue summary: View changes

Hi, 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).