From 588e7ff9b740a0deb6abd1636d62489c44d1cd88 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 3 Aug 2023 20:33:00 +0200 Subject: [PATCH] Fix condition Co-authored-by: Weston Ruter --- includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php b/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php index 251c71d98af..e3b707f555c 100644 --- a/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +++ b/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php @@ -2466,7 +2466,7 @@ private function remove_disallowed_descendants( DOMElement $node, $allowed_desce * @param string $spec_name Spec name. */ private function remove_disallowed_siblings( DOMElement $node, $spec_name ) { - if ( ! $node->previousSibling || ! $node->nextSibling ) { + if ( ! $node->previousSibling && ! $node->nextSibling ) { return; }