ID: 24547
Comment by: spaze at exploited dot cz
Reported By: nn at rtfm dot cz
Status: Open
Bug Type: Variables related
Operating System: Linux Debian
PHP Version: Irrelevant
New Comment:
workaround - this way it works, but..
function foo($type='_GET') {
global $$type; // note this
print_r($$type);
}
looks like a "superglobal access" problem?
Previous Comments:
------------------------------------------------------------------------
[2003-07-08 15:49:11] jf at rtfm dot cz
wtf php?
------------------------------------------------------------------------
[2003-07-08 15:42:22] nn at rtfm dot cz
Description:
------------
I think that this is a bug, see the code, it is self-explaining :-)
Reproduce code:
---------------
function xx ($type = '_POST') {
echo '<pre>'; print_r($$type); echo '</pre>';
}
xx();
Expected result:
----------------
I expect to see my $_POST variables! :-)
Actual result:
--------------
Notice: Undefined variable: _POST in
/www/album.cz/www/album/registrace/index.php on line 31
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24547&edit=1