summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Driver.php2
-rw-r--r--system/libraries/Email.php2
-rw-r--r--system/libraries/Image_lib.php12
-rw-r--r--system/libraries/Zip.php2
4 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index d2e41d6dd..d15d34fc3 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -290,7 +290,7 @@ class CI_Driver {
$trace = debug_backtrace();
_exception_handler(E_ERROR, "No such method '{$method}'", $trace[1]['file'], $trace[1]['line']);
- exit(EXIT_UNKNOWN_METHOD);
+ exit(6); // EXIT_UNKNOWN_METHOD
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fac8a49d5..1f2f6a991 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -732,7 +732,7 @@ class CI_Email {
return FALSE;
}
- if ( ! $fp = @fopen($file, FOPEN_READ))
+ if ( ! $fp = @fopen($file, 'rb'))
{
$this->_set_error_message('lang:email_attachment_unreadable', $file);
return FALSE;
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index ac3db416d..df0df3fec 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -734,7 +734,7 @@ class CI_Image_lib {
{
if ($this->source_image !== $this->new_image && @copy($this->full_src_path, $this->full_dst_path))
{
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
}
return TRUE;
@@ -811,7 +811,7 @@ class CI_Image_lib {
imagedestroy($src_img);
// Set the file to 666
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -881,7 +881,7 @@ class CI_Image_lib {
}
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -969,7 +969,7 @@ class CI_Image_lib {
// we have to rename the temp file.
copy($this->dest_folder.'netpbm.tmp', $this->full_dst_path);
unlink($this->dest_folder.'netpbm.tmp');
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -1014,7 +1014,7 @@ class CI_Image_lib {
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
@@ -1087,7 +1087,7 @@ class CI_Image_lib {
imagedestroy($src_img);
// Set the file to 777
- @chmod($this->full_dst_path, FILE_WRITE_MODE);
+ @chmod($this->full_dst_path, 0666);
return TRUE;
}
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 43abfba42..c634b1133 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -398,7 +398,7 @@ class CI_Zip {
*/
public function archive($filepath)
{
- if ( ! ($fp = @fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE)))
+ if ( ! ($fp = @fopen($filepath, 'w+b')))
{
return FALSE;
}