From 70641cdc4e2e70ca64ef0ea0f5bd948dcf326613 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 7 Mar 2013 11:35:23 +0100 Subject: [PATCH] // PrestaShopException is not available in Autoload --- classes/Autoload.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Autoload.php b/classes/Autoload.php index 10f7c6ece..ca1b07eab 100644 --- a/classes/Autoload.php +++ b/classes/Autoload.php @@ -131,6 +131,7 @@ class Autoload if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename))) { header('HTTP/1.1 503 temporarily overloaded'); + // Cannot use PrestaShopException in this context die('/cache/class_index.php is not writable, please give write permissions (chmod 666) on this file.'); } else @@ -154,7 +155,8 @@ class Autoload if (!$integrity_is_ok) { file_put_contents($filename, ''); - throw new PrestaShopException('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically'); + // Cannot use PrestaShopException in this context + die('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically'); } }