From 310eac9f69f15d9235100a1d136c551f45f9cbd6 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Fri, 14 Dec 2012 14:28:33 +0100 Subject: [PATCH] [-] Core : cannot throw an exception in the autoload #PSCFV-6018 --- classes/Autoload.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/Autoload.php b/classes/Autoload.php index 4b6e74ac6..8464f3bff 100644 --- a/classes/Autoload.php +++ b/classes/Autoload.php @@ -129,7 +129,10 @@ class Autoload // Write classes index on disc to cache it $filename = $this->root_dir.Autoload::INDEX_FILE; if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename))) - throw new PrestaShopException($filename.' is not writable, please give write permissions (chmod 666) on this file.'); + { + header('HTTP/1.1 503 temporarily overloaded'); + die('/cache/class_index.php is not writable, please give write permissions (chmod 666) on this file.'); + } else { // Let's write index content in cache file