41 if ( !$result->getResultData(
'error' ) && !$result->getResultData(
'errors' ) ) {
43 $warnings = $result->removeValue(
'warnings',
null );
44 if ( $this->warningsAsError && $warnings ) {
46 'apierror-opensearch-json-warnings',
48 [
'warnings' => $warnings ]
53 $remove = array_keys( array_diff_key(
54 $result->getResultData(),
55 [ 0 =>
'search', 1 =>
'terms', 2 =>
'descriptions', 3 =>
'urls' ]
57 foreach ( $remove as $key ) {
58 $result->removeValue( $key,
null );