-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
There is small bug here https://github.com/intekhabrizvi/cssparser/blob/master/Cssparser.php#L50
that triggers undefined index 1 if there are 2 selectors without properties next to each other like
$CssParser->read_from_string('.something{}.something{}');
suggested fix
$level2 = explode(";",trim($level1[2][$i]));
if(count($level2) > 1){
foreach($level2 as $l2)
{
if(!empty($l2))
{
$level3 = explode(":", trim($l2));
if(isset($level3[1])){
$this->css[$this->clean($level1[1][$i])][$this->clean($level3[0])] = $this->clean($level3[1]);
unset($level3);
}
}
}
unset($l2);
}
unset($level2);
I know that if they are empty the should not be included in CSS but in some dynamic prints it happens.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels