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

[1.x] Fix Uninitialized Property Error "$replaces" #9

Merged
merged 1 commit into from
May 15, 2024

Conversation

DarkLink363
Copy link
Contributor

This pull request addresses an issue in the Binafy\LaravelStub\LaravelStub class where the $replaces property could be accessed before it was initialized. This typically occurs when neither the replace() nor replaces() functions are used, leading to a PHP error:
Typed property Binafy\LaravelStub\LaravelStub::$replaces must not be accessed before initialization

These change ensure that the $replaces property is always properly initialized before use, preventing potential runtime errors and improving the stability of the package.

"Typed property Binafy\LaravelStub\LaravelStub::$replaces must not be accessed before initialization"
when not using function "replace" and "replaces"
@milwad-dev milwad-dev changed the title Fix Uninitialized Property Error "$replaces" [1.x] Fix Uninitialized Property Error "$replaces" May 15, 2024
@milwad-dev milwad-dev merged commit d21fdf5 into binafy:1.x May 15, 2024
17 checks passed
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.

2 participants