Closed prubini87 closed 8 years ago
You'll need to report this to the WordPress coding standard repo, or wherever you report WordPress tool bugs. The sniff is not checking for an index before using it, but this sniff is not part of PHPCS itself and there is nothing this project can do to fix this error for you.
Note that I have checked all included sniffs using the code you've provided and none produce any errors.
I've bumped into this error and I don't know how to fix it. I'm using the Atom editor v1.10.2, on Windows 10 x64, PHP_CodeSniffer version 2.7.0 (stable) and WordPress-Coding-Standards. I've set my standard to Wordpress, and it's working fine, except when I try to use parenthesis, like so:
<?php echo function( '' ); ?>
I get this error output:
Error: PHP Notice: Undefined index: parenthesis_closer in C:\php7\phpcs-standards\wpcs\WordPress\Sniffs\XSS\EscapeOutputSniff.php on line 322 PHP Notice: Undefined index: parenthesis_closer in C:\php7\phpcs-standards\wpcs\WordPress\Sniffs\XSS\EscapeOutputSniff.php on line 220
Error: PHP Notice: Undefined index: parenthesis_closer in C:\php7\phpcs-standards\wpcs\WordPress\Sniffs\XSS\EscapeOutputSniff.php on line 322 PHP Notice: Undefined index: parenthesis_closer in C:\php7\phpcs-standards\wpcs\WordPress\Sniffs\XSS\EscapeOutputSniff.php on line 220 at ChildProcess. (C:\Users\Pedro Rubini.atom\packages\linter-phpcs\node_modules\sb-exec\lib\index.js:60:20)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
EscapeOutputSniff.php: