[wp-trac] [WordPress Trac] #23165: Admin validation errors on form nonce element IDs (_wpnonce)
WordPress Trac
noreply at wordpress.org
Tue Jan 14 18:25:49 UTC 2020
#23165: Admin validation errors on form nonce element IDs (_wpnonce)
-------------------------------------------------+-------------------------
Reporter: bpetty | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Security | Version:
Severity: normal | Resolution:
Keywords: needs-codex has-patch needs-refresh | Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by bobbingwide):
> resetting this value between test cases, I admit to not being aware of
an option to reset the internal static value.
I'd use a function like this:
{{{
function bw_gmap_map( $inc=true ) {
static $map=0;
if ( $inc ) {
$map++;
} elseif ( null === $inc ) {
$map = 0;
}
return $map;
}
}}}
when a test wants to reset the value it calls the function passing a value
of null
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23165#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list