Skip to content

Commit

Permalink
Fixed bug #1495 : Setting an invalid installed path breaks all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jun 6, 2017
1 parent 046deb2 commit 78f9c94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #1451 : Sniff exclusions/restrictions dont work with custom sniffs unless they use the PHP_CodeSniffer NS
- Fixed bug #1454 : Squiz.WhiteSpace.OperatorSpacing is not checking spacing on either side of a short ternary operator
-- Thanks to Mponos George for the patch
- Fixed bug #1495 : Setting an invalid installed path breaks all commands
- Fixed bug #1496 : Squiz.Strings.DoubleQuoteUsage not unescaping dollar sign when fixing
-- Thanks to Michał Bundyra for the patch
</notes>
Expand Down
5 changes: 5 additions & 0 deletions src/Util/Standards.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ public static function getInstalledStandards(
continue;
}

if (is_dir($standardsDir) === false) {
// Doesn't exist.
continue;
}

$di = new \DirectoryIterator($standardsDir);
foreach ($di as $file) {
if ($file->isDir() === true && $file->isDot() === false) {
Expand Down

0 comments on commit 78f9c94

Please sign in to comment.