Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Exception thrown when extracting variables with url(...) in them #355

Open
torunar opened this issue Dec 12, 2017 · 0 comments
Open

Exception thrown when extracting variables with url(...) in them #355

torunar opened this issue Dec 12, 2017 · 0 comments

Comments

@torunar
Copy link

torunar commented Dec 12, 2017

Minimal working example:

$less = <<<LESS
    @bg: url(http://via.placeholder.com/350x150);
    .foo {
        background: @bg;
    }
LESS;

    $parser = new \Less_Parser();
    $parser->parse($less);
    $css = $parser->getCss();
    $variables = $parser->getVariables();

Running the following code results in

Exception: type missing in switch/case getVariableValue for Url in /srv/www/cscart.dev/app/lib/vendor/oyejorge/less.php/lib/Less/Parser.php on line 351

CSS, however, is compiled properly:

.foo {
  background: url(http://via.placeholder.com/350x150);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant