// don't try to clear smarty cache if smarty is not defined

This commit is contained in:
Rémi Gaillard committed 2013-04-18 14:06:49 +02:00
1 parent f0c5407aa6
commit 5edfd03068
1 file changed
+4 -2
+4 -2
View File
@@ -2119,9 +2119,12 @@ exit;
*/ */
public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null) 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; $smarty = Context::getContext()->smarty;
if ($smarty === null)
return;
if (!$tpl && $cache_id === null && $compile_id === null) if (!$tpl && $cache_id === null && $compile_id === null)
return $smarty->clearAllCache(); return $smarty->clearAllCache();
@@ -2454,4 +2457,3 @@ function cmpPriceDesc($a, $b)
return -1; return -1;
return 0; return 0;
} }