Check $parts variable for false value (#400)

This currently throws a `TypeError` if `$parts` is `false`, which is a valid return value for `preg_split`.
This commit is contained in:
Richard Flynn 2025-06-17 19:36:24 -04:00 committed by GitHub
parent dbb995733d
commit 98b12b84b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -499,7 +499,7 @@ class MarkdownExtra extends \Michelf\Markdown {
$parsed .= $parts[0]; // Text before current tag.
// If end of $text has been reached. Stop loop.
if (count($parts) < 3) {
if ($parts === false || count($parts) < 3) {
$text = "";
break;
}