From: friendica Date: Tue, 9 Jul 2013 00:41:48 +0000 (-0700) Subject: fix nsfw for tag array X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26e302cdc319914851807738597366ba8533e94c;p=friendica-addons.git fix nsfw for tag array --- diff --git a/nsfw.tgz b/nsfw.tgz index da2890e2..9d34dc0a 100755 Binary files a/nsfw.tgz and b/nsfw.tgz differ diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 9a40416d..3f00a2f2 100755 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -144,13 +144,16 @@ function nsfw_prepare_body(&$a,&$b) { $found = true; break; } - if(stristr($b['item']['tags'], '>' . $word . '<' )) { - $found = true; - break; + if(is_array($b['item']['tags']) && count($b['item']['tags'])) { + foreach($b['item']['tags'] as $t) { + if(stristr($t, '>' . $word . '<' )) { + $found = true; + break; + } + } } } - } - + } } if($found) { $rnd = random_string(8);