From 4573b590163185307aa185ee68b0d3fcc8c69b87 Mon Sep 17 00:00:00 2001 From: STJrInuyasha Date: Wed, 30 Dec 2015 05:46:06 -0800 Subject: [PATCH] Slightly less #defcon spam (/lib/function.php #413) MySQL error: SQL syntax error near '' at line 1 Due to trying to make tags when there's no user. --- lib/function.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/function.php b/lib/function.php index 487e909..c812a3e 100644 --- a/lib/function.php +++ b/lib/function.php @@ -402,6 +402,12 @@ function dotags($msg, $user, &$tags = array()) { $tags = json_decode($tags, true); } + if (empty($tags) && empty($user)) { + // settags sent us here and we have nothing to go off of. + // Shrug our shoulders, and move on. + return $msg; + } + if (empty($tags)) { $tags = array( '/me ' => "*". $user['username'] ." ",