Skip to content

Commit f3ec729

Browse files
committed
has_class may return null, coerce to bool
1 parent 074e67d commit f3ec729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/html-api/class-wp-css-selectors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ public function matches( WP_HTML_Processor $processor ): bool {
584584

585585
final class WP_CSS_Class_Selector extends WP_CSS_Selector_Parser {
586586
public function matches( WP_HTML_Processor $processor ): bool {
587-
return $processor->has_class( $this->ident );
587+
return (bool) $processor->has_class( $this->ident );
588588
}
589589

590590
/** @var string */

0 commit comments

Comments
 (0)