From 5a79652e7c572fce25be2aa926a587fb7281d83b Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Thu, 18 Apr 2024 13:17:11 +0300 Subject: [PATCH] Ensure Lexer:: is always initialized --- src/Lexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Lexer.php b/src/Lexer.php index 9e4d6119e..4d7cffdd1 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -71,8 +71,6 @@ class Lexer return; } - $this->isInitialized = true; - // when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default $this->regexes = [ // }} @@ -160,6 +158,8 @@ class Lexer 'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A', 'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A', ]; + + $this->isInitialized = true; } public function tokenize(Source $source): TokenStream