浏览代码

fix str_contains -> strpos

1Day 3 年之前
父节点
当前提交
9c69659a27
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      public/install/forms.php
  2. 1 1
      resources/views/admin/settings/tabs/language.blade.php

+ 1 - 1
public/install/forms.php

@@ -78,7 +78,7 @@ if (isset($_POST['feedDB'])) {
     fwrite($logsfile, $logs);
     fclose($logsfile);
 
-    if (str_contains(getEnvironmentValue("APP_KEY"), "base64")) {
+    if (strpos(getEnvironmentValue("APP_KEY"), 'base64') !== false) {
         header("LOCATION: index.php?step=3");
     } else {
         header("LOCATION: index.php?step=2.5&message=There was an error. Please check install/logs.txt !");

+ 1 - 1
resources/views/admin/settings/tabs/language.blade.php

@@ -14,7 +14,7 @@
                             multiple="multiple" autocomplete="off" @error('defaultLanguage') is-invalid @enderror>
 
                             @foreach (config('app.available_locales') as $lang)
-                                <option value="{{ $lang }}" @if (str_contains(config('SETTINGS::LOCALE:AVAILABLE'), $lang))  selected @endif>
+                                <option value="{{ $lang }}" @if (strpos(config('SETTINGS::LOCALE:AVAILABLE'), $lang) !== false)  selected @endif>
                                     {{ __($lang) }}
                                 </option>
                             @endforeach