summaryrefslogtreecommitdiff
path: root/modules/block/block.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/block/block.module')
-rw-r--r--modules/block/block.module11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index 306870b99..374ffdd84 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -574,18 +574,19 @@ function block_theme_initialize($theme) {
* array key instead of <i>module</i>_<i>delta</i>.
*/
function block_list($region) {
- $blocks = &drupal_static(__FUNCTION__, array());
+ $blocks = &drupal_static(__FUNCTION__);
- if (empty($blocks)) {
+ if (!isset($blocks)) {
$blocks = _block_load_blocks();
}
- // Create an empty array if there were no entries.
+ // Create an empty array if there are no entries.
if (!isset($blocks[$region])) {
$blocks[$region] = array();
}
-
- $blocks[$region] = _block_render_blocks($blocks[$region]);
+ else {
+ $blocks[$region] = _block_render_blocks($blocks[$region]);
+ }
return $blocks[$region];
}