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

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

Merged
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
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.

None yet

2 participants