File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -291,18 +291,18 @@ function function_containing_nested_closure() {
291291 };
292292}
293293
294+ // Tests specifically for the ContextHelper::is_in_function_call().
295+ function disallow_custom_unslash_before_noncecheck_via_method () {
296+ $ var = MyClass::stripslashes_from_strings_only ( $ _POST ['foo ' ] ); // Bad.
297+ wp_verify_nonce ( $ var );
298+ echo $ var ;
299+ }
294300
295-
296-
297-
298-
299-
300-
301-
302-
303-
304-
305-
301+ function disallow_custom_unslash_before_noncecheck_via_namespaced_function () {
302+ $ var = MyNamespace \stripslashes_from_strings_only ( $ _POST ['foo ' ] ); // Bad.
303+ wp_verify_nonce ( $ var );
304+ echo $ var ;
305+ }
306306
307307// Tests specifically for the ContextHelper::is_in_isset_or_empty().
308308function allow_in_array_key_exists_before_noncecheck () {
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ public function getErrorList( $testFile = '' ) {
5959 192 => 1 ,
6060 242 => 1 ,
6161 259 => 1 ,
62+ 296 => 1 ,
63+ 302 => 1 ,
6264 325 => 1 ,
6365 329 => 1 ,
6466 337 => 1 ,
You can’t perform that action at this time.
0 commit comments