Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compiling of PHP-injected variables with false, null or empty string
Less.php 5.1.0 could no longer compile variables injected via Less_Parser->ModifyVars if they have an empty value. This bug was introduced in Ie8d5da3ed47b817bc9dd79070488509a7aa2feb2. In Less.js v3 and above, this remains an unsolved bug. In Less.js < 3.0 and Less.php < 5.1, the following could compile: ``` @foo : ; div{ color: @foo; } ``` Currently, the block above returns an error. We decided to work around this by using "~" with an empty string to serialize an empty value. We caught this in CI while drafting a mediawiki/vendor patch for the Less.php 5.1.0 upgrade at https://gerrit.wikimedia.org/r/1060459. Change-Id: I1bafdbc527a2fef62a0eb7ed36740b38726cb1c4
- Loading branch information