Skip to content

Commit

Permalink
has_class may return null, coerce to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Nov 28, 2024
1 parent 074e67d commit f3ec729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/html-api/class-wp-css-selectors.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public function matches( WP_HTML_Processor $processor ): bool {

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

/** @var string */
Expand Down

0 comments on commit f3ec729

Please sign in to comment.