Skip to content

Conversation

@danesteve
Copy link
Contributor

The current behavior with config prepend and push is inconsistent when used with new/undefined keys:

config()->push('new_key', 'foobar');

seems to work fine.
However,

config()->prepend('new_key2', 'foobar');

throws:

TypeError: array_unshift(): Argument #1 ($array) must be of type array, null given

This PR addresses this issue.

Regards.

@taylorotwell taylorotwell merged commit cf8b275 into laravel:8.x Jan 31, 2022
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