aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-21 23:35:54 -0800
committerzotlabs <mike@macgirvin.com>2016-12-21 23:35:54 -0800
commitf2bfdfdeddea86784ce2d17b3c35e46a1c582b79 (patch)
tree5845446bc4aaf9305e33e8392906f00afd1a027d /include/bb2diaspora.php
parent9d49faca614a08d2414f657619ad56db414c230b (diff)
downloadvolse-hubzilla-f2bfdfdeddea86784ce2d17b3c35e46a1c582b79.tar.gz
volse-hubzilla-f2bfdfdeddea86784ce2d17b3c35e46a1c582b79.tar.bz2
volse-hubzilla-f2bfdfdeddea86784ce2d17b3c35e46a1c582b79.zip
provide separate logging (if configured) for btlogger which is used to catch really subtle issues which don't always leave an audit trail. Similar to dbfail.out, the file btlogger.out (if it exists and is write-able) will only log these unusual situations with backtraces so we can find the culprits.
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 87a8551ae..1759154f0 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -128,6 +128,11 @@ function markdown_to_bb($s, $use_zrl = false) {
$s = str_replace("&#xD;","\r",$s);
$s = str_replace("&#xD;\n&gt;","",$s);
+ if(is_array($s)) {
+ btlogger('markdown_to_bb called with array. ' . print_r($s,true), LOGGER_NORMAL, LOG_WARNING);
+ return '';
+ }
+
$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
// if empty link text replace with the url