Fix #6533: PHP notice on [[Special:Allpages]] with error_reporting(E_ALL) + bad input
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 5 Jul 2006 18:14:06 +0000 (18:14 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 5 Jul 2006 18:14:06 +0000 (18:14 +0000)
includes/SpecialAllpages.php

index 47682cb..53a5b34 100644 (file)
@@ -279,7 +279,7 @@ function showChunk( $namespace = NS_MAIN, $from, $including = false ) {
                $out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
                                $sk->makeKnownLink( $wgContLang->specialPage( "Allpages" ),
                                        wfMsgHtml ( '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( "Allpages" ),