diff options
author | Greg Aker <greg.aker@ellislab.com> | 2010-06-09 18:45:32 +0200 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2010-06-09 18:45:32 +0200 |
commit | c78a259b4af7430f237636b5f93d6eb59443a1e2 (patch) | |
tree | 5ad4834464d6f60ebbe3f036f54ec9f1b2a0087a /system/libraries | |
parent | 2a6c1da49b38abb8767192a064b8c6b01d1e421e (diff) |
Fixed an undefined variable PHP error in the do_xss_clean() method of the Upload library.
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Upload.php | 14 |
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 |