| @@ -286,9 +286,9 @@ | ||
| 286 | 286 | if ( $this->_logger->is_on() ) { |
| 287 | 287 | $this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) ); |
| 288 | 288 | } |
| 289 | 289 | } else { |
| 290 | - if ( is_object( $result ) && 404 == $result->error->http ) { | |
| 290 | + if ( is_object( $result ) && isset( $result->error->http ) && 404 == $result->error->http ) { | |
| 291 | 291 | /** |
| 292 | 292 | * If the response code is 404, cache the result for half of the `$expiration`. |
| 293 | 293 | * |
| 294 | 294 | * @author Leo Fajardo (@leorw) |