Catch warnings if config file rewrite fails

This commit is contained in:
jekkos
2018-04-06 01:00:12 +02:00
parent 3663c7e344
commit cfa7891b06

View File

@@ -930,17 +930,16 @@ class Config extends Secure_Controller
// Chmod the file
@chmod($config_path, 0777);
// Write the new config.php file
$handle = fopen($config_path, 'w+');
// Verify file permissions
if(is_writable($config_path))
{
// Write the new config.php file
$handle = @fopen($config_path, 'w+');
// Write the file
$result = (fwrite($handle, $config) === FALSE) ? FALSE : TRUE;
}
fclose($handle);
fclose($handle);
}
// Chmod the file
@chmod($config_path, 0444);