Skip to content

Commit

Permalink
Sanity check for when the end tag is on the last line instead of a ne…
Browse files Browse the repository at this point in the history
…w line

For example:
/*
 *
 * */
  • Loading branch information
gsherwood committed Feb 18, 2014
1 parent f1891e3 commit 95cf13e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CodeSniffer/Tokenizers/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ private function _processLine($string, $eolChar, $start, $end)
$start += strlen($space['content']);
}

if (isset($string[$start]) === false) {
return $tokens;
}

if ($string[$start] === '@') {
// The content up until the first whitespace is the tag name.
$tagName = '';
Expand Down

0 comments on commit 95cf13e

Please sign in to comment.