From 9bfb5e879debc259ba6adde9653afcb4c6979bd9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 29 May 2023 19:34:01 -0400 Subject: [PATCH] [nsfw] Rewrite string condition to avoid warning message - Address https://github.com/friendica/friendica/issues/13157#issuecomment-1567337197 --- nsfw/nsfw.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 2c8235dd9..4a54d899e 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; }