From 0a0fbc9bf9b5559c5aed6cc08911619cc0b95769 Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Mon, 22 May 2023 16:34:56 +0200 Subject: [PATCH] Minor changed for PHP 8.2 --- lib/Skeleton/Object/Model.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Skeleton/Object/Model.php b/lib/Skeleton/Object/Model.php index a9c11cd..0bd293e 100644 --- a/lib/Skeleton/Object/Model.php +++ b/lib/Skeleton/Object/Model.php @@ -406,10 +406,18 @@ private static function trait_cache_enabled() { return false; } + if (get_called_class() === false) { + return false; + } + if (method_exists(get_called_class(), 'cache_get')) { return true; } + if (get_parent_class(get_called_class()) === false) { + return false; + } + if (method_exists(get_parent_class(get_called_class()), 'cache_get')) { return true; }