bbcode() - ensure that $options is always an array, as the interface has changed slightly

This commit is contained in:
zotlabs 2018-04-04 23:14:41 -07:00
parent c86032d4dc
commit fe401203bd

View file

@ -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);