diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/contact.module | 3 | ||||
-rw-r--r-- | modules/contact/contact.module | 3 |
2 files changed, 4 insertions, 2 deletions
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', |