diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 5cca7233dd4..f9fc04d47de 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -127,11 +127,12 @@ class FormFile
if (preg_match('/g$/i',$maxphp)) $maxphp=$maxphp*1024*1024;
if (preg_match('/t$/i',$maxphp)) $maxphp=$maxphp*1024*1024*1024;
// Now $max and $maxphp are in Kb
- if ($maxphp > 0) $max=min($max,$maxphp);
+ $maxmin = $max;
+ if ($maxphp > 0) $maxmin=min($max,$maxphp);
- if ($max > 0)
+ if ($maxmin > 0)
{
- $out .= '';
+ $out .= '';
}
$out .= '