diff --git a/classes/Tools.php b/classes/Tools.php index 49db8cd9e..e0e91e3a1 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -2119,9 +2119,12 @@ exit; */ public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null) { - if (is_null($smarty)) + if ($smarty === null) $smarty = Context::getContext()->smarty; - + + if ($smarty === null) + return; + if (!$tpl && $cache_id === null && $compile_id === null) return $smarty->clearAllCache(); @@ -2454,4 +2457,3 @@ function cmpPriceDesc($a, $b) return -1; return 0; } -