Skip to content

Commit

Permalink
php 7.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Nov 21, 2019
1 parent 0f5a7f5 commit f16f698
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lessc.inc.php
Expand Up @@ -746,7 +746,7 @@ protected function compileProp($prop, $block, $out) {
if ($suffix !== null &&
$subProp[0] == "assign" &&
is_string($subProp[1]) &&
$subProp[1]{0} != $this->vPrefix)
$subProp[1][0] != $this->vPrefix)
{
$subProp[2] = array(
'list', ' ',
Expand Down Expand Up @@ -1857,7 +1857,7 @@ protected function injectVariables($args) {
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
if ($name{0} != '@') $name = '@'.$name;
if ($name[0] != '@') $name = '@'.$name;
$parser->count = 0;
$parser->buffer = (string)$strValue;
if (!$parser->propertyValue($value)) {
Expand Down Expand Up @@ -2516,7 +2516,7 @@ protected function parseChunk() {
$hidden = true;
if (!isset($block->args)) {
foreach ($block->tags as $tag) {
if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
$hidden = false;
break;
}
Expand Down Expand Up @@ -2570,7 +2570,7 @@ protected function isDirective($dirname, $directives) {
protected function fixTags($tags) {
// move @ tags out of variable namespace
foreach ($tags as &$tag) {
if ($tag{0} == $this->lessc->vPrefix)
if ($tag[0] == $this->lessc->vPrefix)
$tag[0] = $this->lessc->mPrefix;
}
return $tags;
Expand Down

0 comments on commit f16f698

Please sign in to comment.