summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Upload.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 7a5eef0f3..8bdb4be19 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -812,13 +812,13 @@ class CI_Upload {
{
$current = ini_get('memory_limit') * 1024 * 1024;
- // There was a bug/behavioural change in PHP 5.2, where numbers over one million get output
- // into scientific notation. number_format() ensures this number is an integer
- // http://bugs.php.net/bug.php?id=43053
-
- $new_memory = number_format(ceil(filesize($this->new_name) + $current), 0, '.', '');
-
- ini_set('memory_limit', $new_memory); // When an integer is used, the value is measured in bytes. - PHP.net
+ // There was a bug/behavioural change in PHP 5.2, where numbers over one million get output
+ // into scientific notation. number_format() ensures this number is an integer
+ // http://bugs.php.net/bug.php?id=43053
+
+ $new_memory = number_format(ceil(filesize($file) + $current), 0, '.', '');
+
+ ini_set('memory_limit', $new_memory); // When an integer is used, the value is measured in bytes. - PHP.net
}
// If the file being uploaded is an image, then we should have no problem with XSS attacks (in theory), but