mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Throw exception if file_put_contents failed
This commit is contained in:
parent
f72f2f6fbe
commit
dc8764153e
@ -143,6 +143,9 @@ class ConfigFile
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents($this->path, $new_file_contents);
|
||||
$result = file_put_contents($this->path, $new_file_contents);
|
||||
if ($result === false) {
|
||||
throw new RuntimeException(sprintf('Unable to save xml to %s', $this->path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user