Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strlen(): Passing null to parameter #1 ($string) of type string is deprecated #195

Open
dloused opened this issue Oct 28, 2023 · 1 comment

Comments

@dloused
Copy link

dloused commented Oct 28, 2023

Vapid keys generation fails (Laravel 8 / PHP 8.1)

Noone faces this? Did not find a relevant issue...

strlen(): Passing null to parameter #1 ($string) of type string is deprecated

at vendor/laravel-notification-channels/webpush/src/VapidKeysGenerateCommand.php:59
     55▕     protected function setKeysInEnvironmentFile($keys)
     56▕     {
     57▕         $currentKeys = $this->laravel['config']['webpush.vapid'];
     58▕ 
  ➜  59▕         if (strlen($currentKeys['public_key']) !== 0 && (! $this->confirmToProceed())) {
     60▕             return false;
     61▕         }
     62▕ 
     63▕         $this->writeNewEnvironmentFileWith($keys);
@dloused
Copy link
Author

dloused commented Oct 28, 2023

modifying above to this, does it:

if (strlen($currentKeys['public_key'] ?? '') !== 0 && (! $this->confirmToProceed())) {
     return false;
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant