From b2e17c39723fdfa7b36797fae9ba9a7268892e24 Mon Sep 17 00:00:00 2001 From: jamesRUS52 <39707635+jamesRUS52@users.noreply.github.com> Date: Tue, 10 Oct 2023 12:12:08 +0300 Subject: [PATCH] JsonContainsKey supported Fix warnings with JsonContainsKey where clause WARNING Undefined array key "operator" in vendor/genealabs/laravel-model-caching/src/CacheKey.php on line 272. DEPRECATED strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/genealabs/laravel-model-caching/src/CacheKey.php on line 272. Add JsonContainsKey type --- src/CacheKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CacheKey.php b/src/CacheKey.php index fe3913b..2ec89c1 100644 --- a/src/CacheKey.php +++ b/src/CacheKey.php @@ -267,7 +267,7 @@ protected function getTableSlug() : string protected function getTypeClause($where) : string { - $type = in_array($where["type"], ["InRaw", "In", "NotIn", "Null", "NotNull", "between", "NotInSub", "InSub", "JsonContains", "Fulltext"]) + $type = in_array($where["type"], ["InRaw", "In", "NotIn", "Null", "NotNull", "between", "NotInSub", "InSub", "JsonContains", "Fulltext", "JsonContainsKey"]) ? strtolower($where["type"]) : strtolower($where["operator"]);