Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace curly braces for PHP 7.4 & 8.0 compatibility #665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lessc.inc.php
Original file line number Diff line number Diff line change
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 @@ -1963,7 +1963,7 @@ protected function injectVariables($args) {
$this->pushEnv();
$parser = new lessc_parser($this, __METHOD__);
foreach ($args as $name => $strValue) {
if ($name{0} !== '@') {
if ($name[0] !== '@') {
$name = '@' . $name;
}
$parser->count = 0;
Expand Down Expand Up @@ -2624,7 +2624,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 @@ -2678,7 +2678,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