From: Timo Tijhof Date: Fri, 27 Sep 2013 12:23:09 +0000 (+0200) Subject: lessphp: Update to upstream 6e8e724fc7 X-Git-Tag: 1.31.0-rc.0~18660 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=34ce163fbb5dfb43e26b73cd46af591ecb3530e8;p=lhc%2Fweb%2Fwiklou.git lessphp: Update to upstream 6e8e724fc7 Summary of changes: - lessphp throws errors when referencing undeclared variables and mixins. - lessc::addParsedFile is now public. See . Change-Id: Idffe6946f4029659e677f9dfb62566096cc8d5b5 --- diff --git a/includes/libs/lessc.inc.php b/includes/libs/lessc.inc.php index 6db21beb9c..7b1c27b1bb 100644 --- a/includes/libs/lessc.inc.php +++ b/includes/libs/lessc.inc.php @@ -1,7 +1,7 @@ findBlocks($block, $path, $orderedArgs, $keywordArgs); if ($mixins === null) { - // fwrite(STDERR,"failed to find block: ".implode(" > ", $path)."\n"); - break; // throw error here?? + $this->throwError("{$prop[1][0]} is undefined"); } foreach ($mixins as $mixin) { @@ -987,7 +984,7 @@ class lessc { if (isset($items[0])) { return $this->lib_e($items[0]); } - return self::$defaultValue; + $this->throwError("unrecognised input"); case "string": $arg[1] = ""; return $arg; @@ -1415,7 +1412,7 @@ class lessc { } $seen[$key] = true; - $out = $this->reduce($this->get($key, self::$defaultValue)); + $out = $this->reduce($this->get($key)); $seen[$key] = false; return $out; case "list": @@ -1774,7 +1771,7 @@ class lessc { // get the highest occurrence entry for a name - protected function get($name, $default=null) { + protected function get($name) { $current = $this->env; $isArguments = $name == $this->vPrefix . 'arguments'; @@ -1791,7 +1788,7 @@ class lessc { } } - return $default; + $this->throwError("variable $name is undefined"); } // inject array of unparsed strings into environment as variables @@ -2027,7 +2024,7 @@ class lessc { return $this->allParsedFiles; } - protected function addParsedFile($file) { + public function addParsedFile($file) { $this->allParsedFiles[realpath($file)] = filemtime($file); }