From 1268c0023d7085fb4d960b869bf79ef0ade0d212 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 15 Aug 2018 10:57:45 -0700 Subject: Avoid PHP error in Markdown parser parent::inlineLink() could returns null or an array. Bug introduced in commit c44880a. --- app/Core/Markdown.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3