Avoid PHP error in Markdown parser
parent::inlineLink() could returns null or an array.
Bug introduced in commit c44880a.
This commit is contained in:
@@ -155,7 +155,9 @@ class Markdown extends Parsedown
|
|||||||
protected function inlineLink($Excerpt)
|
protected function inlineLink($Excerpt)
|
||||||
{
|
{
|
||||||
$Inline = parent::inlineLink($Excerpt);
|
$Inline = parent::inlineLink($Excerpt);
|
||||||
array_push($Inline['element']['nonNestables'], 'TaskLink', 'UserLink');
|
if (is_array($Inline)) {
|
||||||
|
array_push($Inline['element']['nonNestables'], 'TaskLink', 'UserLink');
|
||||||
|
}
|
||||||
return $Inline;
|
return $Inline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user