Cast attr to string to prevent a PHP deprecation warning in 8.1 (#365)
* Cast attr to string to prevent a PHP deprecation warning in 8.1 * Update the call to preg_match_all to coalesce an empty string on $attr
This commit is contained in:
parent
51613168d7
commit
dbb995733d
1 changed files with 1 additions and 1 deletions
|
|
@ -229,7 +229,7 @@ class MarkdownExtra extends \Michelf\Markdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split on components
|
// Split on components
|
||||||
preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches);
|
preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr ?? '', $matches);
|
||||||
$elements = $matches[0];
|
$elements = $matches[0];
|
||||||
|
|
||||||
// Handle classes and IDs (only first ID taken into account)
|
// Handle classes and IDs (only first ID taken into account)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue