mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Fix #1721 add some safeguards when saving system config file
This commit is contained in:
parent
b01a148675
commit
254634479c
3 changed files with 25 additions and 4 deletions
|
|
@ -303,7 +303,7 @@ class Storage
|
|||
flock($fp, \LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
if ($result === false)
|
||||
if ($result === false || (is_string($content) && strlen($content) !== $result))
|
||||
{
|
||||
trigger_error('Cannot write file: ' . (isset($original_filename) ? $original_filename : $filename), \E_USER_WARNING);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue