From c5d883fcfb203bc3ca3a6243f08eaa1e050ef80c Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Fri, 24 Nov 2006 02:04:48 +0000 Subject: [PATCH] merged fixed a warning --- lib/blocklib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index 6189dc15b8..29ec3ec6aa 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -168,18 +168,18 @@ function blocks_remove_inappropriate($page) { } function blocks_name_allowed_in_format($name, $pageformat) { - $formats = block_method_result($name, 'applicable_formats'); + $accept = NULL; $depth = -1; - if (isset($formats)) { + if ($formats = block_method_result($name, 'applicable_formats')) { foreach($formats as $format => $allowed) { $thisformat = '^'.str_replace('*', '[^-]*', $format).'.*$'; if(ereg($thisformat, $pageformat)) { if(($scount = substr_count($format, '-')) > $depth) { $depth = $scount; $accept = $allowed; - } - } + } + } } } if($accept === NULL) { -- 2.39.5