[-] Core : cannot throw an exception in the autoload #PSCFV-6018

This commit is contained in:
Damien Metzger committed 2012-12-14 14:28:33 +01:00
1 parent 3c2ae9efa7
commit c3c29e3abd
1 file changed
+4 -1
+4 -1
View File
@@ -129,7 +129,10 @@ class Autoload
// Write classes index on disc to cache it // Write classes index on disc to cache it
$filename = $this->root_dir.Autoload::INDEX_FILE; $filename = $this->root_dir.Autoload::INDEX_FILE;
if ((file_exists($filename) && !is_writable($filename)) || !is_writable(dirname($filename))) 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 else
{ {
// Let's write index content in cache file // Let's write index content in cache file