#43928 [Opn->Bgs]: Using periods in encapsulated variables returns white page
| From: | felipe@php.net | Date: | Thu, 24 Jan 2008 16:21:03 +0000 |
| Subject: | #43928 [Opn->Bgs]: Using periods in encapsulated variables returns white page | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121513@lists.php.net to get a copy of this message | ||
ID: 43928
Updated by: felipe@php.net
Reported By: david dot reade at sbhelp dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: CentOS 5.1
PHP Version: 5.2.5
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
http://www.php.net/manual/en/language.variables.external.php
Previous Comments:
------------------------------------------------------------------------
[2008-01-24 15:01:30] arnaud dot lb at gmail dot com
PHP replaces "." with "_" in variables names.
Try isset($_GET['this_is_a_test']) ;)
------------------------------------------------------------------------
[2008-01-24 14:55:26] david dot reade at sbhelp dot co dot uk
Reproduce code should actually read:
<?php
if(isset($_GET['this.is.a.test'])) {
echo('It works!'); exit();
}
if(isset($_GET['this;is;a;test'])) {
echo('It works!'); exit();
}
if(isset($_GET['this:is:a:test'])) {
echo('It works!'); exit();
}
?>
------------------------------------------------------------------------
[2008-01-24 14:54:08] david dot reade at sbhelp dot co dot uk
Description:
------------
Using dots in queries, e.g. "/index.php?this.is.a.test", which returns
a white page with no error, even with 'error_reporting(E_ALL)'. However
using any other symbol, such as a colon, returns the correct result.
Reproduce code:
---------------
<?php
if(isset($_GET['this.is.a.test'])) {
echo('It works!'); exit();
}
if(isset($_GET['this;is;a;test'])) {
echo('It works!'); exit();
}
if(isset($_GET['this;is;a;test'])) {
echo('It works!'); exit();
}
?>
Expected result:
----------------
It works!
Actual result:
--------------
/index.php?this.is.a.test = <white page, no error>
/index.php?this;is;a;test = 'It works!'
/index.php?this:is:a:test = 'It works!'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43928&edit=1