note 26743 deleted from function.import-request-variables by sniper

From: Date: Sat, 23 Aug 2003 00:07:13 +0000
Subject: note 26743 deleted from function.import-request-variables by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54895@lists.php.net to get a copy of this message
Note Submitter: camusatan@yahoo.NOSPAM.com ---- 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.

« previous php.notes (#54895) next »