Skip to content

Commit

Permalink
Remove redundant check for whether validation error has WP_Term
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Gordon <16200219+pierlon@users.noreply.github.com>
  • Loading branch information
westonruter and pierlon committed May 21, 2020
1 parent 85de42e commit ccbf771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/validation/class-amp-validated-url-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public static function get_recent_validation_errors_by_source( $count = 100 ) {
continue;
}
foreach ( $validation_error['data']['sources'] as $source ) {
if ( ! isset( $source['type'], $source['name'] ) || ! $validation_error['term'] instanceof WP_Term ) {
if ( ! isset( $source['type'], $source['name'] ) {
continue;
}
$data = json_decode( $validation_error['term']->description, true );
Expand Down

0 comments on commit ccbf771

Please sign in to comment.