note 26743 added to function.import-request-variables
| From: | camusatan at yahoo dot NOSPAM dot com | Date: | Mon, 11 Nov 2002 16:52:28 +0000 |
| Subject: | note 26743 added to function.import-request-variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39300@lists.php.net to get a copy of this message | ||
On PHP 4.1.2, running on OpenBSD 3.1, I *think* (am not sure) that import_request_variables can
mangle the contents of globals like $_REQUEST, $_POST, etc...here's my test.
print_r($_REQUEST);
import_request_variables("gpc","form_");
print_r($_REQUEST);
the second print_r crashes the server - for me.
I am not sure if this is because I have some form variables with underscores as the first character
(_mode, _perform), or what, exactly, I'm just warning people that they might want to avoid
using this function and instead just use the boring, unpleasant $_REQUEST['foo'] syntax,
instead.
All I do know is that I re-wrote the thing to use the $_REQUEST syntax and it seemed to work. Caveat
Lector.
--
http://www.php.net/manual/en/function.import-request-variables.php
http://master.php.net/manage/user-notes.php?action=edit+26743
http://master.php.net/manage/user-notes.php?action=delete+26743
http://master.php.net/manage/user-notes.php?action=reject+26743