php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34882 Unable to access *original* posted variable name with dot in
Submitted: 2005-10-15 23:39 UTC Modified: 2017-10-24 06:03 UTC
Votes:11
Avg. Score:3.3 ± 1.3
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:1 (16.7%)
From: theo at crazygreek dot co dot uk Assigned:
Status: Open Package: *General Issues
PHP Version: 6CVS OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: theo at crazygreek dot co dot uk
New email:
PHP Version: OS:

 

 [2005-10-15 23:39 UTC] theo at crazygreek dot co dot uk
Description:
------------
PHP automagically converts the '.' char in POST/GET field names to '_'.  While i am fully aware as to why it does it, there is are a number arguments for being able to turn off this 'feature':

 (a) There is no way to change a field name 'animal.moo_cows'
     back to it's original form other than manually parsing
     the POST/GET data.

 (b) For those silly enough to be using register globals, 
     $moo.cows may not be a valid variable - but then 
     neither is $moo:cows, or $moo!cows, yet : and ! are not 
     converted into underscores. where is the logic in that?

Having a ini setting or some such to be able to turn off this rather messed up behaviour would be very useful.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-15 23:54 UTC] pookey@php.net
confirmed 
 
main/php_variables.c, line 106 
 
 [2005-10-16 01:21 UTC] derick@php.net
This should IMO not be any ini setting, but it would make sense not to touch variable names in cases where register_globals is disabled. We should get rid of register_globals altogether in PHP 6, and then we can change this behavior too.
 [2010-12-22 12:42 UTC] johannes@php.net
-Package: Feature/Change Request +Package: *General Issues
 [2010-12-22 12:42 UTC] johannes@php.net
making this a ini setting is incredible pain for writing portable applications. I wonder whether it makes sense to add the element two times to the $_GET / $_POST array - once in replaced and once in non-replaced form.But that might be confusing too. Maybe the best thing is to do the hard cut and break BC.
 [2015-10-06 20:40 UTC] bishop@php.net
-Assigned To: +Assigned To: bishop
 [2015-10-06 20:41 UTC] bishop@php.net
Duplicated by https://bugs.php.net/bug.php?id=42055.
 [2017-10-24 06:03 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: bishop +Assigned To:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 07:01:26 2024 UTC