tweak to the new fopen mode constant names
diff --git a/system/application/config/constants.php b/system/application/config/constants.php
index 3909941..3f79756 100644
--- a/system/application/config/constants.php
+++ b/system/application/config/constants.php
@@ -26,12 +26,14 @@
 | These modes are used when working with fopen()/popen()

 |

 */

-define('FOPEN_READ_BOF', 				'rb');

-define('FOPEN_READ_WRITE_BOF',			'r+b');

-define('FOPEN_WRITE_CREATE_BOF', 		'wb');	// truncates existing file data, use with care

-define('FOPEN_READ_WRITE_CREATE_BOF', 	'w+b'); // truncates existing file data, use with care

-define('FOPEN_WRITE_CREATE_EOF', 		'ab');

-define('FOPEN_READ_WRITE_CREATE_EOF', 	'a+b');

-define('FOPEN_WRITE_CREATE_STRICT', 	'xb');

-define('FOPEN_READ_WRITE_CREATE_STRICT','x+b');

+

+define('FOPEN_READ', 							'rb');

+define('FOPEN_READ_WRITE',						'r+b');

+define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 		'wb');	// truncates existing file data, use with care

+define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 	'w+b'); // truncates existing file data, use with care

+define('FOPEN_WRITE_CREATE', 					'ab');

+define('FOPEN_READ_WRITE_CREATE', 				'a+b');

+define('FOPEN_WRITE_CREATE_STRICT', 			'xb');

+define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');

+

 ?>
\ No newline at end of file
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php
index b6a4ce4..c5c548c 100644
--- a/system/codeigniter/Common.php
+++ b/system/codeigniter/Common.php
@@ -46,7 +46,7 @@
 	{

 		$file = rtrim($file, '/').'/'.md5(rand(1,100));

 		

-		if (($fp = @fopen($file, FOPEN_WRITE_CREATE_EOF)) === FALSE)

+		if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)

 		{

 			return FALSE;

 		}

@@ -56,7 +56,7 @@
 		@unlink($file);

 		return TRUE;

 	}

-	elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE_EOF)) === FALSE)

+	elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)

 	{

 		return FALSE;

 	}

diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 2bcb98b..147a7fd 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -50,7 +50,7 @@
 			return file_get_contents($file);		

 		}

 

-		if (! $fp = @fopen($file, FOPEN_READ_BOF))

+		if (! $fp = @fopen($file, FOPEN_READ))

 		{

 			return FALSE;

 		}

@@ -85,7 +85,7 @@
  */	

 if (! function_exists('write_file'))

 {

-	function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_BOF)

+	function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_DESTRUCTIVE)

 	{

 		if (! $fp = @fopen($path, $mode))

 		{

diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index d71f593..e0fa689 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1070,7 +1070,7 @@
 			$attachment[$z++] = $h;

 			$file = filesize($filename) +1;

 			

-			if (! $fp = fopen($filename, FOPEN_READ_BOF))

+			if (! $fp = fopen($filename, FOPEN_READ))

 			{

 				$this->_set_error_message('email_attachment_unreadable', $filename);

 				return FALSE;

diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 370ab79..26757ba 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -97,7 +97,7 @@
 			$message .= "<"."?php  if (!defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";

 		}

 			

-		if (! $fp = @fopen($filepath, FOPEN_WRITE_CREATE_EOF))

+		if (! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))

 		{

 			return FALSE;

 		}

diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 853c162..0fc38dc 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -741,7 +741,7 @@
 			return FALSE;

 		}

 		

-		if (! $fp = @fopen($file, FOPEN_READ_WRITE_BOF))

+		if (! $fp = @fopen($file, FOPEN_READ_WRITE))

 		{

 			return FALSE;

 		}

diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 6b59880..f7f47ab 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -301,7 +301,7 @@
 	 */	

 	function archive($filepath)

 	{

-		if (! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_BOF)))

+		if (! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE)))

 		{

 			return FALSE;

 		}