-
-
Notifications
You must be signed in to change notification settings - Fork 524
Closed
Labels
Milestone
Description
Bug Description
When i want run the phpcbf i get the following error:
PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /somePath/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php on line 280
Minimal Code Snippet
The issue happens when running this command:
vendor/bin/phpcbf --standard=WordPress someFilePath.php... over a file containing this code:
// All PHP Code FilesError Code
PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /somePath/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php on line 280
Environment
| Question | Answer |
|---|---|
| PHP version | PHP 8.1.4 (cli) |
| PHP_CodeSniffer version | PHP_CodeSniffer version 3.6.2 |
| WPCS version | 2.3.0 |
| WPCS install type | Composer project local |
Additional Context (optional)
Tested Against develop branch?
- I have verified the issue still exists in the
developbranch of WPCS.
Reactions are currently unavailable