← All changes
|
vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
+3
-0
3.2.85
→
3.2.90
View file →
| @@ -1023,8 +1023,11 @@ | ||
| 1023 | 1023 | * @return bool True if it is a letter, False otherwise |
| 1024 | 1024 | */ |
| 1025 | 1025 | protected function is_alpha($input) |
| 1026 | 1026 | { |
| 1027 | + if (!is_string($input) || 1 !== strlen($input)) { | |
| 1028 | + return \false; | |
| 1029 | + } | |
| 1027 | 1030 | $code = ord($input); |
| 1028 | 1031 | return $code >= 97 && $code <= 122 || $code >= 65 && $code <= 90; |
| 1029 | 1032 | } |
| 1030 | 1033 | } |