ResetPassword class custom createUrlCallback #45369
Unanswered
hasanablak
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Error when using createUrlCallback variable in ResetPassword class
Steps To Reproduce:
Create an notification with php artisan make:notification BlaBlaNotification
Eextends ResetPassword class in the BlaBlaNotification
class TestResetPassword extends ResetPassword
and remove all methods
Create a variable of static::$createUrlCallback and assign "test" value
public static $createUrlCallback = "test";
and created a function on name is "test"
got an error when I send the request to the controller class containing the the BlaBlaNotification
Controller
Notification::send(User::first(), new BlaBlaNotification("foo"));
The error:
TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, function "test" not found or invalid function name in file C:\blabla\vendor\laravel\framework\src\Illuminate\Auth\Notifications\ResetPassword.php on line 119
I typed function_exist(static::$createUrlCallback) on line 93 in the ResetPassword class and saw it returned "false"
For this reason, I thought that the call_user_func function could not reach the "test" method in the BlaBlaNotification class.
Beta Was this translation helpful? Give feedback.
All reactions