Skip to content

[11.x] Fix incorrect typechange in Illuminate\Database\Query\Builder#53841

Merged
taylorotwell merged 1 commit intolaravel:11.xfrom
jnoordsij:patch-1
Dec 11, 2024
Merged

[11.x] Fix incorrect typechange in Illuminate\Database\Query\Builder#53841
taylorotwell merged 1 commit intolaravel:11.xfrom
jnoordsij:patch-1

Conversation

@jnoordsij
Copy link
Copy Markdown
Contributor

In #53793 various properties in the Illuminate\Database\Query\Builder class were marked as nullable as they have no initial value, thus defaulting to null. However the wheres properties is initialized with an empty array, thus already is an array on class construction and should never be null.

@jnoordsij jnoordsij changed the title [11.x] Fix incorrect typechange in Query Builder [11.x] Fix incorrect typechange in Illuminate\Database\Query\Builder Dec 11, 2024
@xurshudyan
Copy link
Copy Markdown
Contributor

@jnoordsij You're absolutely correct. The wheres property is initialized as an empty array and should not have been marked as nullable. I initially added the nullable type during development but forgot to remove it before opening the PR. Thank you for catching that!

@taylorotwell taylorotwell merged commit 9f66103 into laravel:11.x Dec 11, 2024
@jnoordsij jnoordsij deleted the patch-1 branch December 11, 2024 17:00
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.

3 participants