Skip to content

Commit

Permalink
Merge pull request '[nsfw] Rewrite string condition to avoid warning …
Browse files Browse the repository at this point in the history
…message' (#1393) from MrPetovan/friendica-addons:bug/warnings into develop

Reviewed-on: https://git.friendi.ca/friendica/friendica-addons/pulls/1393
  • Loading branch information
Tobias Diekershoff committed May 30, 2023
2 parents 54f4a05 + 9bfb5e8 commit 941b8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nsfw/nsfw.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 941b8c5

Please sign in to comment.