Edit report at http://bugs.php.net/bug.php?id=53402&edit=1

 ID:                 53402
 Updated by:         sala...@php.net
 Reported by:        martin dot schmitz at uni-bielefeld dot de
 Summary:            "." is converted to "_" in <input type="file"
                     name="test.txt">
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            *General Issues
 Operating System:   Mandriva 2010 spring
 PHP Version:        5.2.14
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

>From http://php.net/variables.external 

'Dots and spaces in variable names are converted to underscores. For
example 

<input name="a.b" /> becomes $_REQUEST["a_b"].'


Previous Comments:
------------------------------------------------------------------------
[2010-11-25 14:07:07] martin dot schmitz at uni-bielefeld dot de

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 this bug report at http://bugs.php.net/bug.php?id=53402&edit=1

Reply via email to