diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-08-15 10:57:45 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-08-15 10:57:45 -0700 |
commit | 1268c0023d7085fb4d960b869bf79ef0ade0d212 (patch) | |
tree | fc138fad4e50b276aaeae03d85772aaba4c2d6a0 /app/Core | |
parent | 1e671216162638a7cee7e2ea58c4d0dd937f5012 (diff) |
Avoid PHP error in Markdown parser
parent::inlineLink() could returns null or an array.
Bug introduced in commit c44880a.
Diffstat (limited to 'app/Core')
-rw-r--r-- | app/Core/Markdown.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php index ae6adb5e..07e427d1 100644 --- a/app/Core/Markdown.php +++ b/app/Core/Markdown.php @@ -155,7 +155,9 @@ class Markdown extends Parsedown protected function 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; } } |