mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
Replace depreciated helper functions with classfull ones
This commit is contained in:
parent
d90d0e5fbc
commit
4c88d093f1
|
@ -15,6 +15,7 @@ use Flarum\Suspend\Event\Unsuspended;
|
|||
use Flarum\Suspend\SuspendValidator;
|
||||
use Flarum\User\Event\Saving;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class SaveSuspensionToDatabase
|
||||
{
|
||||
|
@ -42,7 +43,7 @@ class SaveSuspensionToDatabase
|
|||
|
||||
public function handle(Saving $event)
|
||||
{
|
||||
$attributes = array_get($event->data, 'attributes', []);
|
||||
$attributes = Arr::get($event->data, 'attributes', []);
|
||||
|
||||
if (array_key_exists('suspendedUntil', $attributes)) {
|
||||
$this->validator->assertValid($attributes);
|
||||
|
|
Loading…
Reference in New Issue
Block a user