diff --git a/includes/validation/class-amp-invalid-url-post-type.php b/includes/validation/class-amp-invalid-url-post-type.php index d16dda6afc9..8504a36ffce 100644 --- a/includes/validation/class-amp-invalid-url-post-type.php +++ b/includes/validation/class-amp-invalid-url-post-type.php @@ -616,7 +616,7 @@ public static function filter_row_actions( $actions, $post ) { $actions[ self::RECHECK_ACTION ] = sprintf( '%s', - self::get_recheck_url( $post, get_edit_post_link( $post->ID, 'raw' ) ), + esc_url( self::get_recheck_url( $post, get_edit_post_link( $post->ID, 'raw' ) ) ), esc_html__( 'Re-check', 'amp' ) ); @@ -807,7 +807,7 @@ public static function handle_validation_error_status_update() { return; } $post = get_post(); - if ( ! $post || self::POST_TYPE_SLUG !== get_post_type( $post ) ) { + if ( ! $post || self::POST_TYPE_SLUG !== $post->post_type ) { return; } $updated_count = 0; diff --git a/includes/validation/class-amp-validation-error-taxonomy.php b/includes/validation/class-amp-validation-error-taxonomy.php index 36b193f5e8a..381e415ca4d 100644 --- a/includes/validation/class-amp-validation-error-taxonomy.php +++ b/includes/validation/class-amp-validation-error-taxonomy.php @@ -237,6 +237,7 @@ public static function get_validation_error_sanitization( $error ) { */ $sanitized = apply_filters( 'amp_validation_error_sanitized', null, $error ); + $forced = false; if ( null !== $sanitized ) { $forced = true; $status = $sanitized ? self::VALIDATION_ERROR_ACCEPTED_STATUS : self::VALIDATION_ERROR_REJECTED_STATUS;