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.
This commit is contained in:
STJrInuyasha 2015-12-30 05:46:06 -08:00
parent c5044d2c0e
commit 4573b59016

View File

@ -402,6 +402,12 @@ function dotags($msg, $user, &$tags = array()) {
$tags = json_decode($tags, true); $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)) { if (empty($tags)) {
$tags = array( $tags = array(
'/me ' => "*<b>". $user['username'] ."</b> ", '/me ' => "*<b>". $user['username'] ."</b> ",