From: Kunal Mehta Date: Sat, 16 May 2015 21:25:22 +0000 (-0700) Subject: ApiOpenSearch: Pass second argument to ApiResult::removeValue() X-Git-Tag: 1.31.0-rc.0~11387 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=147223e1bffd837f2978fda6296b63e6d1faec54;p=lhc%2Fweb%2Fwiklou.git ApiOpenSearch: Pass second argument to ApiResult::removeValue() If $name is null, it will use $path ('warnings'). Bug: T99375 Change-Id: Iad295d2f560d1cc043f7fa64cf402983d4b0e6bd --- 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,