Fix for bug #859195: the string '0' evaluates to false in PHP, even when using the...
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 14 Dec 2003 05:14:04 +0000 (05:14 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 14 Dec 2003 05:14:04 +0000 (05:14 +0000)
includes/OutputPage.php

index 492733c..dacae9a 100644 (file)
@@ -932,7 +932,7 @@ $t[] = "</table>" ;
                                }
                                if($wgNamespacesWithSubpages[$wgTitle->getNamespace()]) { # subpages allowed here
                                        $link = $wgTitle->getPrefixedText(). "/" . trim($noslash);
-                                       if(!$text) {
+                                       if( "" == $text ) {
                                                $text= $m[1]; 
                                        } # this might be changed for ugliness reasons
                                } else {
@@ -943,7 +943,7 @@ $t[] = "</table>" ;
                        } else {
                                $link = substr( $m[1], 1 );
                        }
-                       if( empty( $text ) )
+                       if( "" == $text )
                                $text = $link;
 
                        $nt = Title::newFromText( $link );