From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.1
PHP Bug Type:     *Configuration Issues
Bug description:  max_upload_filesize setting format is problematic

The documentation states that max_upload_filesize is an 
integer, although the result from ini_get is "2M". This is 
problematic for the following reasons: 
 
1. With the documentation stating the format as an 
integer, code can be written to output BAD code such as: 
 
$my_value = 2M; 
 
I fell into this trap and didn't locate the problem easily 
because my test installations (unfortunately) stated the 
max_upload_filesize as a true integer inside php.ini.  
 
2. It is not clear how PHP handles the output of GOOD code 
like: 
 
$my_value = "2M"; 
 
If I later have code like: 
 
if ($my_value > $this_value) 
// i.e., if ("2M" > "345") 
 
Will it break? Will "2M" be considered an integer and 
converted automatically to 2097152? If this is the case 
then it is not immediately evident inside of the 
documentation. 
-- 
Edit bug report at http://bugs.php.net/?id=17389&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17389&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17389&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17389&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17389&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17389&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17389&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17389&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17389&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17389&r=globals

Reply via email to