diff --git a/Classes/Parser/Lexer.php b/Classes/Parser/Lexer.php index 059a4dd..dddf2d8 100644 --- a/Classes/Parser/Lexer.php +++ b/Classes/Parser/Lexer.php @@ -49,7 +49,7 @@ class Lexer public function __construct($string) { $this->string = $string; - $this->currentCharacter = ($string !== '') ? $string{0} : null; + $this->currentCharacter = ($string !== '') ? $string[0] : null; $this->characterPosition = 0; } @@ -250,7 +250,7 @@ public function isEnd(): bool */ public function rewind(): void { - $this->currentCharacter = $this->string{--$this->characterPosition}; + $this->currentCharacter = $this->string[--$this->characterPosition]; } /** @@ -277,7 +277,7 @@ public function consume(): ?string { $c = $this->currentCharacter; if ($this->characterPosition < strlen($this->string) - 1) { - $this->currentCharacter = $this->string{++$this->characterPosition}; + $this->currentCharacter = $this->string[++$this->characterPosition]; } else { $this->currentCharacter = null; } diff --git a/Classes/Service/AfxService.php b/Classes/Service/AfxService.php index b766402..2a1284f 100644 --- a/Classes/Service/AfxService.php +++ b/Classes/Service/AfxService.php @@ -216,7 +216,7 @@ protected static function astNodeToFusion($payload, $indentation = '') // seperate between attributes (before the first spread), meta attributes // spreads and attributes lists between and after spreads foreach ($attributes as $attribute) { - if ($attribute['type'] === 'prop' && $attribute['payload']['identifier']{0} === '@') { + if ($attribute['type'] === 'prop' && $attribute['payload']['identifier'][0] === '@') { $metaAttributes[] = $attribute; } elseif ($attribute['type'] === 'prop' && $spreadIsPresent === false) { $fusionAttributes[] = $attribute;