summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorxims <shklyar@gmail.com>2018-03-08 08:04:48 +0100
committerGitHub <noreply@github.com>2018-03-08 08:04:48 +0100
commit6f7f5f403769544e7e2dd7f6b0056920768236fb (patch)
treeb25449e70a17e19153aed678fcba59ab1574631b /system
parent8ef6526651c4900308255c2cda0f7278223ea387 (diff)
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
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Image_lib.php5
1 files changed, 4 insertions, 1 deletions
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;
}