Uncaught Nette\InvalidStateException: Invalid value in $_POST/$_COOKIE in key ‘_acf_nonce’, expected string, b
- Thommato
- Member | 1
Dear Sir/Madam,
I'm using Nette Forms as setup form for a other form that will show up after the first submit of the Nette form.
Uncaught Nette\InvalidStateException: Invalid value in $_POST/$_COOKIE in key ‘_acf_nonce’, expected string, boolean given.
I'm using the default set-up, like: https://doc.nette.org/…s/standalone
- David Grudl
- Nette Core | 8228
It seems that some library is modifying $_COOKIE
. Try to call
Nette\Forms\Form::initialize()
at the beginning of the script.
- Marek Bartoš
- Nette Blogger | 1275
$_COOKIE values are supposed to come from http request cookie headers and are always string. $_COOKIE should be read-only for userland code.
- janpot
- Member | 2
I agree but found only a little evidence for that in PHP documentation – So is it possible to say never assign
directly, use setcookie
?
- Marek Bartoš
- Nette Blogger | 1275
Currently not, imho it should be handled by a RFC for php-src
In the meanwhile it should be fixed on the plugin side, expectation of Nette is
correct