mirror of
https://github.com/flarum/core.git
synced 2025-10-19 02:36:08 +02:00
Use Laravel's class-based Str and Arr helpers
Starting with version 5.9, the global funtions will be deprecated. * https://laravel-news.com/laravel-5-8-deprecates-string-and-array-helpers * https://github.com/laravel/framework/pull/26898
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Flarum\Event;
|
||||
|
||||
use DirectoryIterator;
|
||||
use Flarum\Locale\LocaleManager;
|
||||
use Illuminate\Support\Arr;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
@@ -49,8 +50,8 @@ class ConfigureLocales
|
||||
throw new RuntimeException("Error parsing composer.json in $name: ".json_last_error_msg());
|
||||
}
|
||||
|
||||
$locale = array_get($json, 'extra.flarum-locale.code');
|
||||
$title = array_get($json, 'extra.flarum-locale.title', $title);
|
||||
$locale = Arr::get($json, 'extra.flarum-locale.code');
|
||||
$title = Arr::get($json, 'extra.flarum-locale.title', $title);
|
||||
}
|
||||
|
||||
if (! isset($locale)) {
|
||||
|
Reference in New Issue
Block a user