Browse Source

fix str_contains -> strpos

1Day 3 years ago
parent
commit
9c69659a27

+ 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