- if ( !$this->getResult()->getResultData( 'error' ) ) {
- $result = $this->getResult();
-
+ $result = $this->getResult();
+ if ( !$result->getResultData( 'error' ) && !$result->getResultData( 'errors' ) ) {
// Ignore warnings or treat as errors, as requested
$warnings = $result->removeValue( 'warnings', null );
if ( $this->warningsAsError && $warnings ) {
// Ignore warnings or treat as errors, as requested
$warnings = $result->removeValue( 'warnings', null );
if ( $this->warningsAsError && $warnings ) {