Skip to content

Commit 31270ce

Browse files
committed
Explicitly check if $param_second_token is an integer
1 parent 6c930ea commit 31270ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Sniffs/WP/OptionAutoloadSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ private function check_autoload_value( array $autoload_info, $function_name ) {
375375
return;
376376
}
377377

378-
if ( $param_second_token
378+
if ( is_int( $param_second_token )
379379
&& false === isset( Collections::arrayOpenTokensBC()[ $this->tokens[ $param_first_token ]['code'] ] )
380380
) {
381381
// Bail early if the parameter has two or more non-empty tokens and the first token is

0 commit comments

Comments
 (0)