summaryrefslogtreecommitdiff
path: root/modules/block
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-12-14 20:10:45 +0000
committerDries Buytaert <dries@buytaert.net>2005-12-14 20:10:45 +0000
commit764f1177efe7bafe5ab47b21968d4b0921c3896c (patch)
treeb0d25865abedeed7d251bef5c43857e79bc6f210 /modules/block
parente53f58fbe0e6c033fce65bd0d7a76d25911ff158 (diff)
downloadbrdo-764f1177efe7bafe5ab47b21968d4b0921c3896c.tar.gz
brdo-764f1177efe7bafe5ab47b21968d4b0921c3896c.tar.bz2
- Patch #40631 by Chris Johnson: is_array() slower than isset() or empty().
Diffstat (limited to 'modules/block')
-rw-r--r--modules/block/block.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index d15f3ed4c..ad479f239 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -599,7 +599,8 @@ function block_list($region) {
// Check the current throttle status and see if block should be displayed
// based on server load.
if (!($block->throttle && (module_invoke('throttle', 'status') > 0))) {
- if (is_array($array = module_invoke($block->module, 'block', 'view', $block->delta))) {
+ $array = module_invoke($block->module, 'block', 'view', $block->delta);
+ if (isset($array) && is_array($array)) {
foreach ($array as $k => $v) {
$block->$k = $v;
}