From 9867f8ae50fd74b8fb1ad1baa5b05a9b3329757c Mon Sep 17 00:00:00 2001 From: "Km.Van" Date: Sat, 11 Jul 2026 16:54:14 +0800 Subject: [PATCH] adjust mb_*, str_* function name --- src/Components/Utils/UtilsCpu.php | 2 +- src/Components/Utils/UtilsLocation.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Utils/UtilsCpu.php b/src/Components/Utils/UtilsCpu.php index 16a5853..f5498d8 100644 --- a/src/Components/Utils/UtilsCpu.php +++ b/src/Components/Utils/UtilsCpu.php @@ -438,7 +438,7 @@ final class UtilsCpu return; } $line = $lines[0]; - if (0 !== mb_strpos($line, 'cpu ')) { + if (0 !== strpos($line, 'cpu ')) { return; } $items = explode(' ', preg_replace('/\\s+/', ' ', $line)); diff --git a/src/Components/Utils/UtilsLocation.php b/src/Components/Utils/UtilsLocation.php index 7d0adba..526d864 100644 --- a/src/Components/Utils/UtilsLocation.php +++ b/src/Components/Utils/UtilsLocation.php @@ -7,7 +7,7 @@ final class UtilsLocation /** * Get IP location. * - * @param [string] $ip + * @param string $ip * * @return array|null $args * $args['country'] string Country, e.g, China @@ -37,7 +37,7 @@ final class UtilsLocation // get langcode from en-US,en;q=0.9,zh-CN;q=0.8,zh-TW;q=0.7,zh;q=0.6 $langcode = ''; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - if (str_contains($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')) { + if (false!==strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')) { $langcode = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',')); } }