mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Display error message if config.local.php is not writable
This commit is contained in:
parent
e2487f97e3
commit
647eae08b4
@ -1651,7 +1651,12 @@ Sent by MyAAC,<br/>
|
||||
}
|
||||
}
|
||||
|
||||
return Settings::saveConfig($configToSave, BASE . 'config.local.php');
|
||||
$success = Settings::saveConfig($configToSave, BASE . 'config.local.php');
|
||||
if (!$success) {
|
||||
error('There has been error saving the config.local.php - probably problem with permissions.');
|
||||
}
|
||||
|
||||
return $success;
|
||||
},
|
||||
],
|
||||
];
|
||||
|
@ -557,10 +557,10 @@ class Settings implements \ArrayAccess
|
||||
$content .= ';' . PHP_EOL;
|
||||
}
|
||||
|
||||
$success = file_put_contents($filename, $content);
|
||||
$success = @file_put_contents($filename, $content);
|
||||
|
||||
// we saved new config.php, need to revalidate cache (only if opcache is enabled)
|
||||
if (function_exists('opcache_invalidate')) {
|
||||
if ($success && function_exists('opcache_invalidate')) {
|
||||
opcache_invalidate($filename);
|
||||
}
|
||||
|
||||
@ -606,7 +606,7 @@ class Settings implements \ArrayAccess
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getErrors() {
|
||||
public function getErrors(): array {
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user