mirror of
https://github.com/flarum/core.git
synced 2025-10-12 15:34:26 +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:
@@ -14,6 +14,7 @@ namespace Flarum\Api\Controller;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\ImageManager;
|
||||
use League\Flysystem\Adapter\Local;
|
||||
@@ -52,7 +53,7 @@ class UploadLogoController extends ShowForumController
|
||||
{
|
||||
$this->assertAdmin($request->getAttribute('actor'));
|
||||
|
||||
$file = array_get($request->getUploadedFiles(), 'logo');
|
||||
$file = Arr::get($request->getUploadedFiles(), 'logo');
|
||||
|
||||
$tmpFile = tempnam($this->app->storagePath().'/tmp', 'logo');
|
||||
$file->moveTo($tmpFile);
|
||||
|
Reference in New Issue
Block a user