tubalmartin / YUI-CSS-compressor-PHP-port

A PHP port of the YUI CSS compressor.
230 stars 34 forks source link

Infinite while-loop bug when minifying invalid CSS #58

Open brandonkelly opened 4 years ago

brandonkelly commented 4 years ago

If you run this:

$minifier = new \tubalmartin\CssMin\Minifier();
$minifier->run('#id {');

Then Minifier::processRuleBodies() will get itself into an infinite while-loop, because it does not consider that $blockEndPos may be false.

Expected behavior is that an exception should be thrown.