Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I couldn't replicate the problem (it worked normally on my machine), so MAYBE it may be a problem with the keys/values you are inserting. It may be tedious, but you should test each of your POST parameters. This is my suggestion:</p> <p>(1) Try with a test array (This should work, as you stated)</p> <pre><code>function dump_extracted_post() { $postParams = array('testkey' =&gt; 'testval'); extract($postParams); var_dump(get_defined_vars()); } dump_extracted_post(); </code></pre> <p>(2) Put all your POST key/values in that array and try again</p> <pre><code>function dump_extracted_post() { $postParams = array('testkey' =&gt; 'testval'); foreach ($_POST as $k=&gt;$v) { $postParams[$k] = $v; } extract($postParams); var_dump(get_defined_vars()); } dump_extracted_post(); </code></pre> <p>If (2) fails, it means that something in your $_POST is causing a problem.</p> <p>Test your results by inserting the POST parameters one-by-one, and you should run into a point where it fails.</p> <pre><code>function dump_extracted_post() { $postParams = array('testkey' =&gt; 'testval'); $i=1; foreach ($_POST as $k=&gt;$v) { if ($i &gt; 1) break; // increment this value each time, and see where the extract fails $postParams[$k] = $v; $i++; } extract($postParams); var_dump(get_defined_vars()); } dump_extracted_post(); </code></pre> <p>If you successfully encounter a POST parameter which causes the extract to fail, you can solve it (or comeback to stackoverflow with a new question).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload