Skip to content

Commit

Permalink
Fixed bug #1615 : Uncaught RuntimeException when phpcbf fails to fix …
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
gsherwood committed Sep 5, 2017
1 parent 121d545 commit 9f8d6a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #1591 : Autoloader failing to load arbitrary files when installed_paths only set via a custom ruleset
- Fixed bug #1605 : Squiz.WhiteSpace.OperatorSpacing false positive on unary minus after comment
-- Thanks to Juliette Reinders Folmer for the patch
- Fixed bug #1615 : Uncaught RuntimeException when phpcbf fails to fix files
- Fixed bug #1637 : Generic.WhiteSpaceScopeIndent closure argument indenting incorrect with multi-line strings
- Fixed bug #1638 : Squiz.WhiteSpace.ScopeClosingBrace closure argument indenting incorrect with multi-line strings
- Fixed bug #1640 : Squiz.Strings.DoubleQuoteUsage replaces tabs with spaces when fixing
Expand Down
5 changes: 4 additions & 1 deletion src/Fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ public function fixFile()

if ($this->numFixes > 0) {
if (PHP_CODESNIFFER_VERBOSITY > 1) {
@ob_end_clean();
if (ob_get_level() > 0) {
ob_end_clean();
}

echo "\t*** Reached maximum number of loops with $this->numFixes violations left unfixed ***".PHP_EOL;
ob_start();
}
Expand Down

0 comments on commit 9f8d6a6

Please sign in to comment.