lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

findImport() issue

Open sannefoltz opened this issue 13 years ago • 0 comments

There's an error in findImport()

$full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url;

This line breaks imports of outside the parent less file folder.

So let's say you have: main.less

which has: @import "../lib/jquery_ui/jquery-ui-1.10.0.custom.less";

That breaks on hosting providers, cause of the preceding "/" which triggers the open_base dir directive error. You should just leave the paths alone and leave them up to the developer. On local development it works, since the "/" stands for the root and all play nice, but with relative nested paths, it crashes.

Regards

sannefoltz avatar Feb 26 '13 00:02 sannefoltz