Bug #53402 [NEW]: "." is converted to "_" in <input type="file" name="test.txt">
| From: | martin dot schmitz at uni-bielefeld dot de | Date: | Thu, 25 Nov 2010 13:07:08 +0000 |
| Subject: | Bug #53402 [NEW]: "." is converted to "_" in <input type="file" name="test.txt"> | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-156437@lists.php.net to get a copy of this message | ||
From:
Operating system: Mandriva 2010 spring
PHP version: 5.2.14
Package: *General Issues
Bug Type: Bug
Bug description:"." is converted to "_" in <input type="file"
name="test.txt">
Description:
------------
If a the <name>-tag of an <input> contains a dot, if is transferred to an
underscore. I googled all around, but can't find anything.
I wonder because:
$test = array( 'title_image.img'=>'bla');
works. So why it is converted?
Is it a bug or a feature :-)?
Test script:
---------------
<html>
<head>
<title>Test</title>
</head>
<body>
<pre>
<?php
echo $_FILES['title_image.img']['name'];
var_dump( $_FILES);
?>
</pre>
<form name="form" method="post" action=""
enctype="multipart/form-data">
<input type="file" name="title_image.img" />
<input type="submit" name="save" value="Speichern" />
</form>
</body>
</html>
Expected result:
----------------
array(1) {
["title_image.img"]=>
array(5) {
["name"]=>
string(0) ""
["type"]=>
string(0) ""
["tmp_name"]=>
string(0) ""
["error"]=>
int(4)
["size"]=>
int(0)
}
}
Actual result:
--------------
Notice: Undefined index: title_image.img in
/media/DATA/home/mschmitz/public_html/customer/uni/fm/tischlerei/test.php
on line 9
array(1) {
["title_image_img"]=>
array(5) {
["name"]=>
string(0) ""
["type"]=>
string(0) ""
["tmp_name"]=>
string(0) ""
["error"]=>
int(4)
["size"]=>
int(0)
}
}
--
Edit bug report at http://bugs.php.net/bug.php?id=53402&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53402&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53402&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53402&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53402&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53402&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53402&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53402&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53402&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53402&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53402&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53402&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53402&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53402&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53402&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53402&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53402&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53402&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53402&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53402&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53402&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53402&r=mysqlcfg