mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Fix access to potentially uninitialised offset
This commit is contained in:
parent
c26a2ee4bf
commit
29fce0ec37
@ -1476,7 +1476,7 @@ class Parsedown
|
||||
|
||||
protected function inlineSpecialCharacter($Excerpt)
|
||||
{
|
||||
if ($Excerpt['text'][1] !== ' ' and strpos($Excerpt['text'], ';') !== false
|
||||
if (substr($Excerpt['text'], 1, 1) !== ' ' and strpos($Excerpt['text'], ';') !== false
|
||||
and preg_match('/^&(#?+[0-9a-zA-Z]++);/', $Excerpt['text'], $matches)
|
||||
) {
|
||||
return array(
|
||||
|
Loading…
Reference in New Issue
Block a user