summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-08-06 23:21:51 +0200
committerAndrey Andreev <narf@devilix.net>2014-08-06 23:21:51 +0200
commit345478b8b746ac2e64def739a78b053eebc68c64 (patch)
treef48e33a561d82b7ecda273b4374829ce8b5f6bf8 /system/libraries
parent9b8286cf0320c8d8864ce4a5fc892c06787a9762 (diff)
parenta8027ffc90ef80819fba01209fa57f810e2104af (diff)
Merge pull request #3169 from Patroklo/develop
Change name didn't work if reset initialization it's true
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Upload.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 75fc0624f..7946111cc 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -327,23 +327,26 @@ class CI_Upload {
$this->$key = $defaults[$key];
}
}
-
- return $this;
+
}
-
- foreach ($config as $key => &$value)
+ else
{
- if ($key[0] !== '_' && $reflection->hasProperty($key))
+
+ foreach ($config as $key => &$value)
{
- if ($reflection->hasMethod('set_'.$key))
- {
- $this->{'set_'.$key}($value);
- }
- else
+ if ($key[0] !== '_' && $reflection->hasProperty($key))
{
- $this->$key = $value;
+ if ($reflection->hasMethod('set_'.$key))
+ {
+ $this->{'set_'.$key}($value);
+ }
+ else
+ {
+ $this->$key = $value;
+ }
}
}
+
}
// if a file_name was provided in the config, use it instead of the user input