mirror of
https://github.com/antonioribeiro/google2fa.git
synced 2026-04-27 00:55:49 +03:00
[GH-ISSUE #90] Default value for parameters with a class type hint can only be NULL #40
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/google2fa#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @binitghetiya on GitHub (Dec 12, 2017).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/90
Laravel 5.4 Php 5.6
$user = User::first();
$google2fa = new Google2FA();
$code_from_app = "332117";
$valid = $google2fa->verifyKey($user->google2fa_secret, $code_from_app);
Throwing error : Default value for parameters with a class type hint can only be NULL
I had some search and found that php-cs-fixer issue it requires PHP 7.1 but i haven't used that and for this library min PHP version require is 5.4 So, please look into this issue.
Thanks
@csrDev369 commented on GitHub (Feb 23, 2018):
Any update on this? I have the same problem but working locally with php v5.6.25 work perfect but on production server, same php version I get the same error:
(1/1) FatalErrorExceptionDefault value for parameters with a class type hint can only be NULL
in Base32.php (line 43)
I'm using laravel 5.4...
@antonioribeiro commented on GitHub (Mar 7, 2018):
I need more information on this, because there are no type hints, code has 100% tests coverage and is passing even on PHP 5.4:
@dingxiangjun commented on GitHub (Apr 8, 2018):
Default value for parameters with a class type hint can only be NULL
FatalErrorException in Base32.php line 43:
I'm using laravel 5.0
I'm using php 5.6.25
@maximedeoliveira commented on GitHub (Jun 18, 2018):
Got this error too : Default value for parameters with a class type hint can only be NULL in vendor\paragonie\constant_time_encoding\src\Base32.php on line 43
PHP 5.5
Anyone got a fix ?