← All changes
|
vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php
+4
-0
3.23.3
→
3.24.2
View file →
| @@ -1207,8 +1207,12 @@ | ||
| 1207 | 1207 | * @return bool True if it is a letter, False otherwise |
| 1208 | 1208 | */ |
| 1209 | 1209 | protected function is_alpha($input) |
| 1210 | 1210 | { |
| 1211 | + if (!is_string($input) || 1 !== strlen($input)) { | |
| 1212 | + return false; | |
| 1213 | + } | |
| 1214 | + | |
| 1211 | 1215 | $code = ord($input); |
| 1212 | 1216 | |
| 1213 | 1217 | return ($code >= 97 && $code <= 122) || ($code >= 65 && $code <= 90); |
| 1214 | 1218 | } |