Closed Krinkle closed 2 years ago
Test plan suggestion:
var_dump(this->path)
to observe that when you run bin/lessc a.less
(with a.less
and b.less
from https://github.com/wikimedia/less.php/issues/29#issuecomment-895706701 in the git project directory), you will find the code is run multiple times. The first time, the Tee_Import
node has a Tree_URL
path with a Tree_Variable
value (and no value property), and then later it gets run with a Tree_Anonymous
value which does have a value property.
The import worked fine, but it produced a warning as side-effect.
Prevent this by recognising that some URL nodes assigned to $path during the first phase have $value set to a Variable node (instead of an Anonymous node), and thus don't have a value property themselves yet.
Fixes https://github.com/wikimedia/less.php/issues/29. Fixes https://github.com/wikimedia/less.php/issues/32.