Avoid setRequestExpectations() call in internal API mode
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 8 Feb 2016 20:26:39 +0000 (12:26 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 8 Feb 2016 20:26:44 +0000 (12:26 -0800)
This can avoid some pointless log spam.

Change-Id: I14be6eca00a9ba3faeb1febb9ed31033cad11831

includes/api/ApiMain.php

index 458fd18..fdf7acc 100644 (file)
@@ -1263,7 +1263,9 @@ class ApiMain extends ApiBase {
                $module = $this->setupModule();
                $this->mModule = $module;
 
-               $this->setRequestExpectations( $module );
+               if ( !$this->mInternalMode ) {
+                       $this->setRequestExpectations( $module );
+               }
 
                $this->checkExecutePermissions( $module );