// don't try to clear smarty cache if smarty is not defined
This commit is contained in:
1 parent
f0c5407aa6
commit
5edfd03068
1 file changed
+5
-3
+5
-3
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user