Skip to content

[13.x] Fix access to uninitialised typed static property #1811

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

owenvoke
Copy link
Contributor

@owenvoke owenvoke commented May 2, 2025

This adds a default value of null for Passport::$keyPath, otherwise you get the following error if you haven't used the Passport::loadKeysFrom() method (e.g. if you just want to use the default of storage_path()).

Typed static property Laravel\Passport\Passport::$keyPath must not be accessed before initialization

This error happens on this line:

return static::$keyPath

@owenvoke owenvoke changed the title fix: resolve access to uninitialised typed static property [13.x] Fix access to uninitialised typed static property May 2, 2025
@taylorotwell taylorotwell merged commit 9c32934 into laravel:13.x May 2, 2025
9 of 10 checks passed
@marijoo
Copy link

marijoo commented May 9, 2025

Any idea when this will be released?

@owenvoke owenvoke deleted the patch-1 branch May 9, 2025 09:07
@eldair
Copy link
Contributor

eldair commented May 9, 2025

Any idea when this will be released?

@marijoo same question here :/ but you can use "13.x-dev" version until they make a new release

@JonPurvis
Copy link

Thanks for sorting @owenvoke 🍻

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

Successfully merging this pull request may close these issues.

5 participants