1
0
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:
a.dmitryuk 2022-02-18 10:05:23 +07:00
parent f72f2f6fbe
commit dc8764153e

View File

@ -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));
}
}
}