27 if ( !$result->getResultData(
'error' ) && !$result->getResultData(
'errors' ) ) {
29 $warnings = $result->removeValue(
'warnings',
null );
30 if ( $this->warningsAsError && $warnings ) {
32 'apierror-opensearch-json-warnings',
34 [
'warnings' => $warnings ]
39 $remove = array_keys( array_diff_key(
40 $result->getResultData(),
41 [ 0 =>
'search', 1 =>
'terms', 2 =>
'descriptions', 3 =>
'urls' ]
43 foreach ( $remove as $key ) {
44 $result->removeValue( $key,
null );