From 147223e1bffd837f2978fda6296b63e6d1faec54 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 16 May 2015 14:25:22 -0700 Subject: [PATCH] ApiOpenSearch: Pass second argument to ApiResult::removeValue() If $name is null, it will use $path ('warnings'). Bug: T99375 Change-Id: Iad295d2f560d1cc043f7fa64cf402983d4b0e6bd --- includes/api/ApiOpenSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php index 16d8b5504a..a93b7cc698 100644 --- a/includes/api/ApiOpenSearch.php +++ b/includes/api/ApiOpenSearch.php @@ -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, -- 2.20.1