From: Hypolite Petovan Date: Mon, 29 May 2023 23:34:01 +0000 (-0400) Subject: [nsfw] Rewrite string condition to avoid warning message X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9bfb5e879debc259ba6adde9653afcb4c6979bd9;p=friendica-addons.git [nsfw] Rewrite string condition to avoid warning message - Address https://github.com/friendica/friendica/issues/13157#issuecomment-1567337197 --- diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 2c8235dd..4a54d899 100644 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -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; }