diff --git a/inc/functions.php b/inc/functions.php index b6b5f16e..6029e68f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -212,11 +212,12 @@ } function file_write($path, $data) { - $fp = fopen($path, 'c'); + if(!$fp = fopen($path, 'c')) + error('Unable to open file for writing: ' . $path); // File locking if(!flock($fp, LOCK_EX)) { - error('Unable to lock file!'); + error('Unable to lock file: ' . $path); } // Truncate file