]> git.mxchange.org Git - friendica-addons.git/commitdiff
fix nsfw for tag array
authorfriendica <info@friendica.com>
Tue, 9 Jul 2013 00:41:48 +0000 (17:41 -0700)
committerfriendica <info@friendica.com>
Tue, 9 Jul 2013 00:41:48 +0000 (17:41 -0700)
nsfw.tgz
nsfw/nsfw.php

index da2890e23a4b2bf17285d3c637ed3a31bda439fa..9d34dc0aa9fcfb5f0a1ddc540e4dfdd452fecdd7 100755 (executable)
Binary files a/nsfw.tgz and b/nsfw.tgz differ
index 9a40416db24863ec62d2d41d797b0b3cfa443e10..3f00a2f23889cb11bfb99bf39a40931c066f3c89 100755 (executable)
@@ -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);