]> git.mxchange.org Git - friendica-addons.git/commitdiff
[nsfw] Rewrite string condition to avoid warning message
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 29 May 2023 23:34:01 +0000 (19:34 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 29 May 2023 23:34:01 +0000 (19:34 -0400)
- Address https://github.com/friendica/friendica/issues/13157#issuecomment-1567337197

nsfw/nsfw.php

index 2c8235dd98585c4dad0d1dda6d839447d4542bda..4a54d899e201c2eb9d77477a2def9679fef945e8 100644 (file)
@@ -88,7 +88,7 @@ function nsfw_addon_settings_post(array &$b)
                $word_list = explode(',', $words);
                foreach ($word_list as $word) {
                        $word = trim($word);
-                       if (!$words || $word[0] != '/') {
+                       if (!$words || strpos($word, '/') !== 0) {
                                continue;
                        }