Fix #6534: PHP notice on Special:Prefixindex with bad input + error_reporting(E_ALL).
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 5 Jul 2006 18:16:01 +0000 (18:16 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 5 Jul 2006 18:16:01 +0000 (18:16 +0000)
includes/SpecialPrefixindex.php

index ebaff98..bbfc278 100644 (file)
@@ -131,7 +131,7 @@ function showChunk( $namespace = NS_MAIN, $prefix, $including = false, $from = n
                $out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
                                $sk->makeKnownLink( $wgContLang->specialPage( $this->name ),
                                        wfMsg ( 'allpages' ) );
-               if ( $dbr && ($n == $this->maxPerPage) && ($s = $dbr->fetchObject( $res )) ) {
+               if ( isset($dbr) && $dbr && ($n == $this->maxPerPage) && ($s = $dbr->fetchObject( $res )) ) {
                        $namespaceparam = $namespace ? "&namespace=$namespace" : "";
                        $out2 .= " | " . $sk->makeKnownLink(
                                $wgContLang->specialPage( $this->name ),