mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-16 12:57:32 -04:00
Catch warnings if config file rewrite fails
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user