diff options
author | Matt Farina <[email protected]> | 2013-04-10 15:06:01 -0400 |
---|---|---|
committer | Matt Farina <[email protected]> | 2013-04-10 15:06:01 -0400 |
commit | a9dc2ac5aafbab2025f5aef6a1427f813e20fbac (patch) | |
tree | 5d522ce19baa7515a52131bab97b1531047119fc /src/HTML5/Parser/Scanner.php | |
parent | 5d7cd7d13d8092017311dcb0d830dd55697d25a1 (diff) |
Added bounds checking to the scanner current method.
Diffstat (limited to 'src/HTML5/Parser/Scanner.php')
-rw-r--r-- | src/HTML5/Parser/Scanner.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/HTML5/Parser/Scanner.php b/src/HTML5/Parser/Scanner.php index 4716fc4..63b7be4 100644 --- a/src/HTML5/Parser/Scanner.php +++ b/src/HTML5/Parser/Scanner.php @@ -68,7 +68,10 @@ class Scanner { * The current character. */ public function current() { - return $this->is->current(); + if ($this->is->valid()) { + return $this->is->current(); + } + return FALSE; } /** |