Merge "API: Warn when unsupported PHP array syntax is used"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 29 Apr 2014 03:30:10 +0000 (03:30 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 29 Apr 2014 03:30:10 +0000 (03:30 +0000)
1  2 
includes/api/ApiMain.php

@@@ -995,13 -997,9 +1006,11 @@@ class ApiMain extends ApiBase 
        /**
         * Get a boolean request value, and register the fact that the parameter
         * was used, for logging.
 +       * @param string $name
 +       * @return bool
         */
        public function getCheck( $name ) {
-               $this->mParamsUsed[$name] = true;
-               return $this->getRequest()->getCheck( $name );
+               return $this->getVal( $name, null ) !== null;
        }
  
        /**