mirror of
https://github.com/flarum/core.git
synced 2025-08-01 06:00:24 +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:
@@ -18,6 +18,7 @@ use Flarum\User\PasswordToken;
|
||||
use Flarum\User\UserValidator;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Validation\Factory;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
@@ -72,9 +73,9 @@ class SavePasswordController implements RequestHandlerInterface
|
||||
{
|
||||
$input = $request->getParsedBody();
|
||||
|
||||
$token = PasswordToken::findOrFail(array_get($input, 'passwordToken'));
|
||||
$token = PasswordToken::findOrFail(Arr::get($input, 'passwordToken'));
|
||||
|
||||
$password = array_get($input, 'password');
|
||||
$password = Arr::get($input, 'password');
|
||||
|
||||
try {
|
||||
// todo: probably shouldn't use the user validator for this,
|
||||
|
Reference in New Issue
Block a user