$HTTP_POST_VARS
| From: | Alex Buell | Date: | Mon, 04 Sep 2000 09:55:04 +0000 |
| Subject: | $HTTP_POST_VARS | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15087@lists.php.net to get a copy of this message | ||
I'm getting the following error message
Warning: Variable passed to reset() is not an array or object in
/home/httpd/html/test.php4 on line 38
Warning: Variable passed to key() is not an array or object in
/home/httpd/html/test.php4 on line 38
Here's the snippet of code that causes the above error messages:
function anti_hack()
{
for (reset($HTTP_POST_VARS); $key = key($HTTP_POST_VARS);
next($HTTP_POST_VARS))
{
$this = addslashes($HTTP_POST_VARS[$key]);
$this = strtr($this, ">", " ");
$this = strtr($this, "<", " ");
$this = strtr($this, "|", " ");
$$key = $this;
}
}
Any ideas why? I've made sure that track_vars is enabled.