Skip to content

Commit

Permalink
IniWriter: Avoid deprecation notice upon write errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Aug 13, 2024
1 parent c27b43f commit d06ce98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/File/Ini/IniWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct(Config $config, $filename, $filemode = 0660, $option
*/
public function render()
{
if (file_exists($this->filename)) {
if ($this->filename !== null && file_exists($this->filename)) {
$oldconfig = Config::fromIni($this->filename);
$content = trim(file_get_contents($this->filename));
} else {
Expand Down

0 comments on commit d06ce98

Please sign in to comment.