Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when running PHPCBF #3166

Closed
jackjpdiscos opened this issue Nov 17, 2020 · 2 comments
Closed

Error message when running PHPCBF #3166

jackjpdiscos opened this issue Nov 17, 2020 · 2 comments

Comments

@jackjpdiscos
Copy link

Hi,

I get the following error when running the PHPCBF command:

vendor/bin/phpcbf : PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: Trying to access array offset on value
of type null in C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php on line 1291 in
C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Runner.php:606
At line:1 char:1

  • vendor/bin/phpcbf --standard=WordPress MDJM\includes\actions.php
  •   + CategoryInfo          : NotSpecified: (PHP Fatal error...\Runner.php:606:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

Stack trace:

Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: Trying to access array offset on value of type null in C:\xampp\php
\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php on line 1291 in C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Runner.php:606
Stack trace:
#0 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php(1291): PHP_CodeSniffer\Runner->handleErrors(8, 'Trying to acces...
', 'C:\xampp\php\ve...', 1291, Array)
#1 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniffs\CSRF\NonceVerificationSniff.php(153): WordPress\Sniff->has_nonce_chec
k(117)
#2 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php(832): WordPress\Sniffs\CSRF\NonceVerificationSniff->process_token(
117)
#3 C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Files\File.php(496): WordPress\Sniff->process(Object(PHP_CodeSniffer\Files\LocalF
ile), 117)
#4 C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Files\LocalFile.php(91): PHP_CodeSniffer\Files\File->process()
#5 C:\xampp\php\vendor\squizlabs\php_cod in C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Runner.php on line 606
#0 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php(1291): PHP_CodeSniffer\Runner->handleErrors(8, 'Trying to
acces...', 'C:\xampp\php\ve...', 1291, Array)
#1 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniffs\CSRF\NonceVerificationSniff.php(153):
WordPress\Sniff->has_nonce_check(117)
#2 C:\xampp\php\vendor\wp-coding-standards\wpcs\WordPress\Sniff.php(832):
WordPress\Sniffs\CSRF\NonceVerificationSniff->process_token(117)
#3 C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Files\File.php(496):
WordPress\Sniff->process(Object(PHP_CodeSniffer\Files\LocalFile), 117)
#4 C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Files\LocalFile.php(91): PHP_CodeSniffer\Files\File->process()
#5 C:\xampp\php\vendor\squizlabs\php_cod in C:\xampp\php\vendor\squizlabs\php_codesniffer\src\Runner.php on line 606

@jrfnl
Copy link
Contributor

jrfnl commented Nov 18, 2020

@jackjpdiscos You may want to report this to the WordPressCS repo instead, including a code samples with which this issue would be reproducable. Without more information, there is not much anyone can do about this.

@jackjpdiscos
Copy link
Author

@jrfnl Thank you, I will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants