#34100 [Opn->Bgs]: register_globals overrides object assignment
| From: | tony2001@php.net | Date: | Fri, 12 Aug 2005 14:42:49 +0000 |
| Subject: | #34100 [Opn->Bgs]: register_globals overrides object assignment | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83452@lists.php.net to get a copy of this message | ||
ID: 34100
Updated by: tony2001@php.net
Reported By: michael at scribeofthenile dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: GNU/Linux
PHP Version: 4.4.0
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
Try this too:
<?php
$t ="string";
$t->property ="test";
var_dump($t);
?>
PHP >= 5.x gives warning in this case.
Previous Comments:
------------------------------------------------------------------------
[2005-08-12 16:25:32] michael at scribeofthenile dot com
Description:
------------
While register_globals is enabled, if a GET parameter is passed with
the same name as an object, the object assignation is ignored.
Reproduce code:
---------------
Access via "file.php?test=string"
$test->test = 'test';
var_dump($test);
Expected result:
----------------
object(stdClass)(1) { ["test"]=> string(4) "test" }
Actual result:
--------------
string(6) "string"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34100&edit=1