Skip to content
New issue

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

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

Already on GitHub? # to your account

[11.x] Fix: error when using orderByRaw in query before using cursorPaginate #50887

Merged
merged 1 commit into from
Apr 2, 2024
Merged

[11.x] Fix: error when using orderByRaw in query before using cursorPaginate #50887

merged 1 commit into from
Apr 2, 2024

Conversation

ngunyimacharia
Copy link
Contributor

When using orderByRaw with a custom query, you get this error message:

Error: array_flip(): Can only flip string and integer values, entry skipped

This is because orderByRaw will add null to $this->parameters resulting in the above error.

Adding filter ensures that null entries are automatically removed before the flip operation.

…ate()`

Error: `array_flip(): Can only flip string and integer values, entry skipped`
@taylorotwell taylorotwell merged commit f172dfa into laravel:11.x Apr 2, 2024
30 checks passed
@ngunyimacharia ngunyimacharia deleted the patch-1 branch April 2, 2024 13:12
@driesvints driesvints changed the title [11.X] Fix: error when using orderByRaw in query before using cursorPaginate [11.x] Fix: error when using orderByRaw in query before using cursorPaginate Apr 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants