How can I add a search feature to my Drupal 7 Zen child theme frontpage? I would like to add a search form to the front page. I've added this to my template.php:

function my_theme_preprocess_page(&amp;$variables){
   $search_box = drupal_render(drupal_get_form('search_form'));
   $variables['search_box'] = $search_box;
}


I've added this to my page.tpl.php:

&lt;?php print $search_box; ?&gt;


After viewing my site I do see the search form but get this error:


  Strict warning: Only variables should be passed by reference in
  denta_quest_preprocess_page() (line 142 of
  C:\xampp\htdocs\drupal\themes\my_theme\template.php).
Your probably getting the warning because the function takes its argument by reference and to pass a variable by reference it needs to be defined. You're passing a function call which isn't a variable.

Try the following...

$search_form = drupal_get_form('search_form');
$search_box = drupal_render($search_form);
$variables['search_box'] = $search_box;