From: Alexandre Emsenhuber Date: Wed, 10 Nov 2010 08:28:26 +0000 (+0000) Subject: Fix for r70871: need explicit check against null since current check also catches... X-Git-Tag: 1.31.0-rc.0~33951 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=0bb158e8d6cac67941044ed858e971430694f8b6;p=lhc%2Fweb%2Fwiklou.git Fix for r70871: need explicit check against null since current check also catches "0", thus making an infinite redirect loop for that article --- diff --git a/includes/Wiki.php b/includes/Wiki.php index 7ae585b11c..feebcdef77 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -211,7 +211,7 @@ class MediaWiki { } // Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant } else if ( $action == 'view' && !$request->wasPosted() - && ( !$request->getVal( 'title' ) || $title->getPrefixedDBKey() != $request->getText( 'title' ) ) + && ( $request->getVal( 'title' ) === null || $title->getPrefixedDBKey() != $request->getText( 'title' ) ) && !count( array_diff( array_keys( $request->getValues() ), array( 'action', 'title' ) ) ) ) { if ( $title->getNamespace() == NS_SPECIAL ) {