From 812795a9bdc90a48e75b16524c792ae884a4fe91 Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Sat, 1 Apr 2006 23:54:57 +0000 Subject: #56722, Variable not passed by reference in comment.module, patch by chx --- modules/contact.module | 3 ++- modules/contact/contact.module | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/contact.module b/modules/contact.module index da34b83e0..076d284b0 100644 --- a/modules/contact.module +++ b/modules/contact.module @@ -463,8 +463,9 @@ function contact_mail_page() { } else { // If there is only one category, store its cid. + $category_keys = array_keys($categories); $form['cid'] = array('#type' => 'value', - '#value' => array_shift(array_keys($categories)), + '#value' => array_shift($category_keys), ); } $form['message'] = array('#type' => 'textarea', diff --git a/modules/contact/contact.module b/modules/contact/contact.module index da34b83e0..076d284b0 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -463,8 +463,9 @@ function contact_mail_page() { } else { // If there is only one category, store its cid. + $category_keys = array_keys($categories); $form['cid'] = array('#type' => 'value', - '#value' => array_shift(array_keys($categories)), + '#value' => array_shift($category_keys), ); } $form['message'] = array('#type' => 'textarea', -- cgit v1.2.3