diff --git a/lib/Less/Parser.php b/lib/Less/Parser.php index ef8a8164..c788e153 100644 --- a/lib/Less/Parser.php +++ b/lib/Less/Parser.php @@ -2134,7 +2134,7 @@ private function parseAlpha() { } $value = $this->matchReg( '/\\G[0-9]+/' ); - if ( !$value ) { + if ( $value === null ) { $value = $this->expect( 'parseEntitiesVariable', 'Could not parse alpha' ); } diff --git a/test/Fixtures/less.php/css/T371606-alpha-zero-error.css b/test/Fixtures/less.php/css/T371606-alpha-zero-error.css new file mode 100644 index 00000000..5656bcf7 --- /dev/null +++ b/test/Fixtures/less.php/css/T371606-alpha-zero-error.css @@ -0,0 +1,3 @@ +.alpha { + filter: alpha(opacity=0); +} diff --git a/test/Fixtures/less.php/less/T371606-alpha-zero-error.less b/test/Fixtures/less.php/less/T371606-alpha-zero-error.less new file mode 100644 index 00000000..0c7fd30d --- /dev/null +++ b/test/Fixtures/less.php/less/T371606-alpha-zero-error.less @@ -0,0 +1,3 @@ +.alpha { + filter: alpha(opacity=0); + }