Do strict check for $par in Special:Log
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 5 Sep 2012 19:52:03 +0000 (21:52 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 6 Sep 2012 04:27:14 +0000 (06:27 +0200)
Otherwise Special:Log/0 would not behave as expected.

Change-Id: I47ac43ca71bd7384f19c51a11f114240b0cc0702

includes/specials/SpecialLog.php

index 8ab0976..7800e56 100644 (file)
@@ -33,7 +33,7 @@ class SpecialLog extends SpecialPage {
        /**
         * List log type for which the target is a user
         * Thus if the given target is in NS_MAIN we can alter it to be an NS_USER
-        * Title user instead. 
+        * Title user instead.
         */
        private $typeOnUser = array(
                'block',
@@ -47,7 +47,7 @@ class SpecialLog extends SpecialPage {
 
        public function execute( $par ) {
                global $wgLogRestrictions;
-               
+
                $this->setHeaders();
                $this->outputHeader();
 
@@ -65,7 +65,7 @@ class SpecialLog extends SpecialPage {
 
                // Set values
                $opts->fetchValuesFromRequest( $this->getRequest() );
-               if ( $par ) {
+               if ( $par !== null ) {
                        $this->parseParams( $opts, (string)$par );
                }