From 978c24260ea30de3b29d4436d707bdc67a8e9b9e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 17 May 2014 23:30:48 +0200 Subject: [PATCH] The 'c' mode will do the following: - open file for writing (with + also for reading aka "random access mode") - if file does not exist, create it - if file exists, don't truncate (unlike 'w' does) and don't fail (unlike 'x' does). - set seek position to beginning of file - 'b' is for binary data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../io/class_FrameworkFileInputOutputPointer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php index da4096f9..b167fee3 100644 --- a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -57,7 +57,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP } // Try to open a handler - $filePointer = fopen($fileName, 'a+b'); + $filePointer = fopen($fileName, 'c+b'); if ((is_null($filePointer)) || ($filePointer === FALSE)) { // Something bad happend throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID); -- 2.39.5