Skip to content

Commit 106aa59

Browse files
committed
Normalize nonceVerificationFunctions instead of customNonceVerificationFunctions
1 parent 89d3066 commit 106aa59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPress/Sniffs/Security/NonceVerificationSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,13 @@ private function set_cache( $filename, $start, $end, $nonce ) {
413413
*/
414414
protected function mergeFunctionLists() {
415415
if ( $this->customNonceVerificationFunctions !== $this->addedCustomNonceFunctions ) {
416-
$this->customNonceVerificationFunctions = array_map( 'strtolower', $this->customNonceVerificationFunctions );
417-
418416
$this->nonceVerificationFunctions = RulesetPropertyHelper::merge_custom_array(
419417
$this->customNonceVerificationFunctions,
420418
$this->nonceVerificationFunctions
421419
);
422420

421+
$this->nonceVerificationFunctions = array_change_key_case( $this->nonceVerificationFunctions );
422+
423423
$this->addedCustomNonceFunctions = $this->customNonceVerificationFunctions;
424424
}
425425
}

0 commit comments

Comments
 (0)