Skip to content

Commit

Permalink
Extra check in blocks_preferred_width: don't examine any instance if …
Browse files Browse the repository at this point in the history
…that

block is not visible. Apart from fixing a bug, this is also they key to
fixing broken behavior with legacy 1.4 blocks.
  • Loading branch information
defacer committed Apr 30, 2005
1 parent 61abc65 commit 9b68732
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ function blocks_preferred_width(&$instances) {
continue;
}
$block = blocks_get_record($instance->blockid);
if(!$block->visible) {
continue;
}
$pref = block_method_result($block->name, 'preferred_width');
if($pref === NULL) {
continue;
Expand Down

0 comments on commit 9b68732

Please sign in to comment.