From c7b38db60fd3132d0d6af6bf741528109e00a729 Mon Sep 17 00:00:00 2001 From: Ronald Exterkate Date: Tue, 13 Oct 2015 19:36:20 +0200 Subject: [PATCH] writeFile, do not force append mode use the actual $mode parameter instead of forcing append mode --- xpdo/cache/xpdocachemanager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpdo/cache/xpdocachemanager.class.php b/xpdo/cache/xpdocachemanager.class.php index 995467b5..a24f0f19 100644 --- a/xpdo/cache/xpdocachemanager.class.php +++ b/xpdo/cache/xpdocachemanager.class.php @@ -219,7 +219,7 @@ public function writeFile($filename, $content, $mode= 'wb', $options= array()) { $append = false; break; } - $fmode = (strlen($mode) > 1 && in_array($mode[1], array('b', 't'))) ? "a{$mode[1]}" : 'a'; + $fmode = (strlen($mode) > 1 && in_array($mode[1], array('b', 't'))) ? "{$mode[0]}{$mode[1]}" : $mode[0]; $file= @fopen($filename, $fmode); if ($file) { if ($append === true) {