mikebronner / laravel-model-caching

Eloquent model-caching made easy.
MIT License
2.22k stars 212 forks source link

GeneaLabs\LaravelModelCaching\CacheKey::processEnum() #432

Closed Musamba24 closed 6 months ago

Musamba24 commented 1 year ago

I'm facing this issues in a couple of situations like deleting a model: but in both situations the whole function is almost the same. It's a try/catch with the delete method of a model inside.

try {
            $article->delete();

            return redirect(request()->header('Referer'));
        } catch (Exception $e) {
            return redirect(request()->header('Referer'))
                ->with([
                        'errormsg' => session()->flash('errorMessage', $e),
                    ]);
        }

Here is the full stack error: https://flareapp.io/share/VP6AGVam#F71

bertoost commented 1 year ago

I'm getting the same error, using Model::findMany($ids); method

bertoost commented 1 year ago

I'm getting the same error, using Model::findMany($ids); method

In my case it was because one of the $ids was a NULL value, instead of an expected INT

mikebronner commented 6 months ago

This should be fixed now, thanks for your patience!