From 667528d5b927f0f284a067b0e24c9ca7f26c28a4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 23 Nov 2024 18:23:49 +0000 Subject: Use PHP 8 'str_' functions. A few more characters in some places, but helps with readability. --- classes/RPC.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/RPC.php') diff --git a/classes/RPC.php b/classes/RPC.php index 6edc88480..03786beaa 100644 --- a/classes/RPC.php +++ b/classes/RPC.php @@ -23,7 +23,7 @@ class RPC extends Handler_Protected { for ($i = 0; $i < $l10n->total; $i++) { if (isset($l10n->table_originals[$i * 2 + 2]) && $orig = $l10n->get_original_string($i)) { - if(strpos($orig, "\000") !== false) { // Plural forms + if(str_contains($orig, "\000")) { // Plural forms $key = explode(chr(0), $orig); $rv[$key[0]] = _ngettext($key[0], $key[1], 1); // Singular @@ -774,7 +774,7 @@ class RPC extends Handler_Protected { if (!empty($omap[$action])) { foreach ($omap[$action] as $sequence) { - if (strpos($sequence, "|") !== false) { + if (str_contains($sequence, "|")) { $sequence = substr($sequence, strpos($sequence, "|")+1, strlen($sequence)); -- cgit v1.2.3-54-g00ecf