Less.php fix php version problem with strpos wanting a string and nonempty needle value

This commit is contained in:
dedeibel 2018-12-22 14:16:39 +01:00
parent e31bb476ee
commit b165d27cb9

View file

@ -10331,7 +10331,7 @@ class Less_SourceMap_Generator extends Less_Configurable {
$basePath = $this->getOption('sourceMapBasepath');
// "Trim" the 'sourceMapBasepath' from the output filename.
if (strpos($filename, $basePath) === 0) {
if (! empty($basePath) && strpos($filename, (string) $basePath) === 0) {
$filename = substr($filename, strlen($basePath));
}