diff --git a/WordPress/Sniffs/WP/PostsPerPageSniff.php b/WordPress/Sniffs/WP/PostsPerPageSniff.php index a3f8ce45a7..e9d47aaede 100644 --- a/WordPress/Sniffs/WP/PostsPerPageSniff.php +++ b/WordPress/Sniffs/WP/PostsPerPageSniff.php @@ -78,7 +78,7 @@ public function callback( $key, $val, $line, $group ) { $val = $stripped_val; } - $first_char = $val[0]; + $first_char = isset( $val[0] ) ? $val[0] : ''; if ( '-' === $first_char || '+' === $first_char ) { $val = ltrim( $val, '-+' ); } else {