Skip to content

processEnum(): Argument #1 ($value) must be of type BackedEnum|UnitEnum|Illuminate\Database\Query\Expression|string, null given #457

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

Closed
rezalabbafi opened this issue Nov 29, 2023 · 2 comments

Comments

@rezalabbafi
Copy link

rezalabbafi commented Nov 29, 2023

i have this method in my repository

protected function _builder(): Builder
    {
        $model = $this->app->make($this->model());
        $builder = $model::query();
        // SOME OTHER LINES
        return $builder;
    }

When I'm using Laravel model caching and call this

$this->_builder()->find($id)

if $id = null then there is this error

GeneaLabs\LaravelModelCaching\CacheKey::processEnum(): Argument #1 ($value) must be of type BackedEnum|UnitEnum|Illuminate\Database\Query\Expression|string, null given, called in /var/www/html/vendor/genealabs/laravel-model-caching/src/CacheKey.php on line 429

@Restingo
Copy link

Duplicate of #443, PR #456 should fix both.

@mikebronner
Copy link
Owner

This should be fixed now, thanks for your patience!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants