Skip to content

Commit

Permalink
[PMakowski] squizlabs#2.5.1.x-dev: fix unfinite loop if CLI argument …
Browse files Browse the repository at this point in the history
…is incorrectly quoted
  • Loading branch information
Piotr Makowski committed Mar 17, 2016
1 parent 7394ee4 commit 3651599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CodeSniffer/CLI.php
Expand Up @@ -726,8 +726,8 @@ public function processLongArgument($arg, $pos)
} else if (substr($arg, 0, 12) === 'editor-path=') {
$value = substr($arg, 12);
if (1 === preg_match('/^[\'\"]/', $value, $matches)) {
while (0 === preg_match("/[{$matches[0]}]$/", $value)) {
$value .= ' '.$this->_cliArgs[++$pos];
while ((0 === preg_match("/[{$matches[0]}]$/", $value)) && (isset($this->_cliArgs[++$pos]) === true)) {
$value .= ' '.$this->_cliArgs[$pos];
$this->_cliArgs[$pos] = '';
}

Expand Down

0 comments on commit 3651599

Please sign in to comment.