summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/file_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 8cfe0f1c1..8fdb5f7cc 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -80,7 +80,7 @@ if ( ! function_exists('write_file'))
flock($fp, LOCK_EX);
- for ($written = 0, $length = strlen($data); $written < $length; $written += $result)
+ for ($result = $written = 0, $length = strlen($data); $written < $length; $written += $result)
{
if (($result = fwrite($fp, substr($data, $written))) === FALSE)
{