wp-blog-header.php wiping out $_REQUEST array
|Reported by:||mitchkramez||Owned by:|
I'm not sure when this started happening, but i'm guessing 2.8... i've confirmed this with 2.8.1 and 2.8.2:
<? $_POST['postvar'] = 1; $_REQUEST['testvar1'] = 1; $_REQUEST['testvar2'] = 1; $_REQUEST['testvar3'] = 1; require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php'); ?> <pre><? print_r($_REQUEST) ?></pre> <pre><? print_r($_POST) ?></pre>
if you do try this you'll see your request array is blank after the require... It seems to me this is a bug. If you need to use wp functions outside of wp, you need to include the wp-blog-header.php file... and with custom url rewriting for the other non wp parts of the site storing variables in the request array. If you pass the variable in on the query string it works fine.