summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-08-15 10:57:45 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-08-15 10:57:45 -0700
commit1268c0023d7085fb4d960b869bf79ef0ade0d212 (patch)
treefc138fad4e50b276aaeae03d85772aaba4c2d6a0
parent1e671216162638a7cee7e2ea58c4d0dd937f5012 (diff)
Avoid PHP error in Markdown parser
parent::inlineLink() could returns null or an array. Bug introduced in commit c44880a.
-rw-r--r--app/Core/Markdown.php4
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;
}
}