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

This commit is contained in:
Damien Metzger
2012-12-14 14:28:33 +01:00
parent 689a10d9bd
commit 310eac9f69
+4 -1
View File
@@ -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