spatie / laravel-query-builder

Easily build Eloquent queries from API requests
https://spatie.be/docs/laravel-query-builder
MIT License
4.02k stars 397 forks source link

PHP8.1 passing null to explode() is deprecated warning for $includeParts #741

Closed steven-fox closed 2 years ago

steven-fox commented 2 years ago

Identical to PR #702 (commit), the include parameter on a QueryBuilderRequest can be null and should be checked before passing to the explode() function.

https://github.com/spatie/laravel-query-builder/blob/e7abb43f1ee94753a2be3b4dc6e79eaf03d4a9d5/src/QueryBuilderRequest.php#L41

Update to if (! is_array($includeParts) && ! is_null($includeParts)) {

Currently bogged with other work but can try to make a PR soon if someone doesn't beat me to it.