diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-14 20:10:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-14 20:10:45 +0000 |
commit | 764f1177efe7bafe5ab47b21968d4b0921c3896c (patch) | |
tree | b0d25865abedeed7d251bef5c43857e79bc6f210 /modules/comment/comment.module | |
parent | e53f58fbe0e6c033fce65bd0d7a76d25911ff158 (diff) | |
download | brdo-764f1177efe7bafe5ab47b21968d4b0921c3896c.tar.gz brdo-764f1177efe7bafe5ab47b21968d4b0921c3896c.tar.bz2 |
- Patch #40631 by Chris Johnson: is_array() slower than isset() or empty().
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index efca38ca5..c4dac7d36 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1112,7 +1112,7 @@ function theme_comment_admin_overview($form) { $header = array(NULL, t('Subject'), t('Author'), t('Time'), t('Operations')); $output = form_render($form['options']); - if (is_array($form['subject'])) { + if (isset($form['subject']) && is_array($form['subject'])) { foreach (element_children($form['subject']) as $key) { $row = array(); $row[] = form_render($form['comments'][$key]); @@ -1657,7 +1657,7 @@ function comment_invoke_comment(&$comment, $op) { foreach (module_implements('comment') as $name) { $function = $name .'_comment'; $result = $function($comment, $op); - if (is_array($result)) { + if (isset($result) && is_array($result)) { $return = array_merge($return, $result); } else if (isset($result)) { |