Merge "Remove maintenance script deleteImageMemcached.php"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 17 May 2015 02:44:28 +0000 (02:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 17 May 2015 02:44:28 +0000 (02:44 +0000)
includes/api/ApiOpenSearch.php

index 16d8b55..a93b7cc 100644 (file)
@@ -384,7 +384,7 @@ class ApiOpenSearchFormatJson extends ApiFormatJson {
 
        public function execute() {
                if ( !$this->getResult()->getResultData( 'error' ) ) {
-                       $warnings = $this->getResult()->removeValue( 'warnings' );
+                       $warnings = $this->getResult()->removeValue( 'warnings', null );
                        if ( $this->warningsAsError && $warnings ) {
                                $this->dieUsage(
                                        'Warnings cannot be represented in OpenSearch JSON format', 'warnings', 0,