Fix mb_ord() being called with empty string

When passing the empty string to mb_ord(), it emits a warning on PHP < 8 and throws a ValueError on PHP 8+, so we need to guard against the empty string. This can occur when parsing invalid selectors such as an ID without a name ("#").

Merge request reports

Loading