File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
29
29
- The indent property of PEAR.Classes.ClassDeclaration has been removed
30
30
-- Instead of calculating the indent of the brace, it just ensures the brace is aligned with the class keyword
31
31
-- Other sniffs can be used to ensure the class itself is indented correctly
32
+ - Invalid exclude rules inside a ruleset.xml file are now ignored instead of potentially causing out of memory errors
33
+ -- Using the -vv command line argument now also shows the invalid exclude rule as XML
32
34
- Includes all changes from the 2.8.1 release
33
35
- Fixed bug #1333 : The new autoloader breaks some frameworks with custom autoloaders
34
36
- Fixed bug #1334 : Undefined offset when explaining standard with custom sniffs
Original file line number Diff line number Diff line change @@ -372,6 +372,16 @@ public function processRuleset($rulesetPath, $depth=0)
372
372
373
373
if (isset ($ rule ->exclude ) === true ) {
374
374
foreach ($ rule ->exclude as $ exclude ) {
375
+ if (isset ($ exclude ['name ' ]) === false ) {
376
+ if (PHP_CODESNIFFER_VERBOSITY > 1 ) {
377
+ echo str_repeat ("\t" , $ depth );
378
+ echo "\t\t* ignoring empty exclude rule * " .PHP_EOL ;
379
+ echo "\t\t\t=> " .$ exclude ->asXML ().PHP_EOL ;
380
+ }
381
+
382
+ continue ;
383
+ }
384
+
375
385
if ($ this ->shouldProcessElement ($ exclude ) === false ) {
376
386
continue ;
377
387
}
You can’t perform that action at this time.
0 commit comments