From 6f7f5f403769544e7e2dd7f6b0056920768236fb Mon Sep 17 00:00:00 2001 From: xims Date: Thu, 8 Mar 2018 18:04:48 +1100 Subject: Update Image_lib to avoid setting file permissions when not needed When processing an image, there is no need to set file permissions when using dynamic_output. In some cases, it floods the log file with errors ERROR --> Severity: Warning --> chmod(): Operation not permitted ...../CodeIgniter/libraries/Image_lib.php 838 --- system/libraries/Image_lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index dbe5cbbd1..a07557f61 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -835,7 +835,10 @@ class CI_Image_lib { imagedestroy($dst_img); imagedestroy($src_img); - chmod($this->full_dst_path, $this->file_permissions); + if ($this->dynamic_output !== TRUE) + { + chmod($this->full_dst_path, $this->file_permissions); + } return TRUE; } -- cgit v1.2.3-24-g4f1b