diff --git a/includes/sanitizers/class-amp-core-theme-sanitizer.php b/includes/sanitizers/class-amp-core-theme-sanitizer.php index 83069132838..8518f8d3db8 100644 --- a/includes/sanitizers/class-amp-core-theme-sanitizer.php +++ b/includes/sanitizers/class-amp-core-theme-sanitizer.php @@ -1594,7 +1594,7 @@ public function wrap_modal_in_lightbox( $args = [] ) { public function add_twentytwenty_modals() { $modals = $this->xpath->query( "//*[ @class and contains( concat( ' ', normalize-space( @class ), ' ' ), ' cover-modal ' ) ]" ); - if ( false === $modals || 0 === $modals->count() ) { + if ( false === $modals || 0 === $modals->length ) { return; } @@ -1672,7 +1672,7 @@ public function add_twentytwenty_toggles() { $toggles = $this->xpath->query( '//*[ @data-toggle-target ]' ); $body_id = AMP_DOM_Utils::get_element_id( $this->get_body_node(), 'body' ); - if ( false === $toggles || 0 === $toggles->count() ) { + if ( false === $toggles || 0 === $toggles->length ) { return; }