From f097642beb151f7bb3c7b4db5996dd5b138da7e9 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 27 May 2018 01:48:05 +0900 Subject: [PATCH] Update storage.php --- system/storage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/storage.php b/system/storage.php index 5517428..d9b0aad 100644 --- a/system/storage.php +++ b/system/storage.php @@ -142,8 +142,8 @@ if(!function_exists("write_storage_file")) { if($fhandle = fopen($upload_filename, "w")) { if(fwrite($fhandle, $data)) { $result = $upload_filename; - if(array_key_empty("chmod", $options)) { - @chmod($result); + if(!array_key_empty("chmod", $options)) { + @chmod($result, $options['chmod']); } } fclose($fhandle);