* Use mb_strpos instead of str_contains.

This commit is contained in:
zhujinyong
2023-08-30 16:09:28 +08:00
parent 9e0c6beef9
commit 75f80be864
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -482,7 +482,7 @@ class baseControl
$cssExtPath = $this->app->getModuleExtPath($moduleName, 'css');
$clientLang = $this->app->getClientLang();
$notCNLang = !str_contains('|zh-cn|zh-tw|', "|{$clientLang}|");
$notCNLang = mb_strpos('|zh-cn|zh-tw|', "|{$clientLang}|") === false;
$css = '';
$devicePrefix = $this->devicePrefix;
@@ -537,7 +537,7 @@ class baseControl
public function getExtCSS(array $files, string $suffix = ''): string
{
$clientLang = $this->app->getClientLang();
$notCNLang = !str_contains('|zh-cn|zh-tw|', "|{$clientLang}|");
$notCNLang = mb_strpos('|zh-cn|zh-tw|', "|{$clientLang}|") === false;
$filePairs = array();
foreach($files as $cssFile)
+1 -1
View File
@@ -2965,7 +2965,7 @@ class baseRouter
* 忽略该错误:Redefining already defined constructor。
* Skip the error: Redefining already defined constructor.
**/
if(str_contains($message, 'Redefining')) return true;
if(mb_strpos($message, 'Redefining') !== false) return true;
/*
* 设置错误信息。