Skip to content

Commit 3ab520d

Browse files
DAreRodzsamueljseay
authored andcommitted
Run logic when is null
1 parent aedb36e commit 3ab520d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/interactivity-api/class-wp-interactivity-api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,11 @@ private function _process_directives( string $html ) {
521521
}
522522
} else {
523523
$each_child_attrs = $p->get_attribute_names_with_prefix( 'data-wp-each-child' );
524-
if ( ! is_countable( $each_child_attrs ) ) {
524+
if ( null === $each_child_attrs ) {
525525
continue;
526526
}
527527

528-
if ( 0 !== count( $each_child_attrs ) ) {
528+
if ( null !== $each_child_attrs && 0 !== count( $each_child_attrs ) ) {
529529
/*
530530
* If the tag has a `data-wp-each-child` directive, jump to its closer
531531
* tag because those tags have already been processed.

0 commit comments

Comments
 (0)