Merge "Avoid setRequestExpectations() call in internal API mode"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index eb76024..3b62541 100644 (file)
@@ -1281,7 +1281,9 @@ class ApiMain extends ApiBase {
                $module = $this->setupModule();
                $this->mModule = $module;
 
-               $this->setRequestExpectations( $module );
+               if ( !$this->mInternalMode ) {
+                       $this->setRequestExpectations( $module );
+               }
 
                $this->checkExecutePermissions( $module );