From fe401203bd33fdb19880420556c8a6b6a371f94e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 4 Apr 2018 23:14:41 -0700 Subject: bbcode() - ensure that $options is always an array, as the interface has changed slightly --- include/bbcode.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 8850f1c65..152e4888f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -780,6 +780,10 @@ function parseIdentityAwareHTML($Text) { function bbcode($Text, $options = []) { + if(! is_array($options)) { + $options = []; + } + $preserve_nl = ((array_key_exists('preserve_nl',$options)) ? $options['preserve_nl'] : false); $tryoembed = ((array_key_exists('tryoembed',$options)) ? $options['tryoembed'] : true); $cache = ((array_key_exists('cache',$options)) ? $options['cache'] : false); -- cgit v1.2.3