diff options
author | zotlabs <mike@macgirvin.com> | 2018-04-04 23:14:41 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-04-04 23:14:41 -0700 |
commit | fe401203bd33fdb19880420556c8a6b6a371f94e (patch) | |
tree | ff0655733d820e72ed42e8bb13ff024fd52555e3 /include/bbcode.php | |
parent | c86032d4dc0e3396a03d8bcc8eef25d9191f3cfc (diff) | |
download | volse-hubzilla-fe401203bd33fdb19880420556c8a6b6a371f94e.tar.gz volse-hubzilla-fe401203bd33fdb19880420556c8a6b6a371f94e.tar.bz2 volse-hubzilla-fe401203bd33fdb19880420556c8a6b6a371f94e.zip |
bbcode() - ensure that $options is always an array, as the interface has changed slightly
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 4 |
1 files changed, 4 insertions, 0 deletions
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); |