From 4bf243936764895114ffe0f3563ffb62043a0a3b Mon Sep 17 00:00:00 2001 From: Samuel Rounce Date: Mon, 21 Nov 2011 12:48:40 +0000 Subject: [PATCH] Selector line parsing no longer fails when checking for poorly formed comments. --- lib/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parser.php b/lib/parser.php index f89fe66..0b71d7b 100644 --- a/lib/parser.php +++ b/lib/parser.php @@ -569,7 +569,7 @@ protected function parse_selector_line($line, $level){ $len = strlen($line); for($i = 0; $i < $len; $i++ ){ $this->switch_string_state($line{$i}); - if($this->state != 'st' && $line{$i} == '/' && $line{$i+1} == '/'){ // Break on comment + if($this->state != 'st' && (isset($line{$i}) && $line{$i} == '/') && (isset($line{$i+1}) && $line{$i+1} == '/') ){ // Break on comment break; } $this->token .= $line{$i};