Skip to content

Commit

Permalink
Merge pull request #14 from merkle-open/feat/php-8-1-support
Browse files Browse the repository at this point in the history
Fix PHP error, type property must not be accessed before initialization.
  • Loading branch information
rdamjanov authored Nov 1, 2023
2 parents f30c2b8 + 3b5f9ce commit 94eacc6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Twig/TerrificCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class TerrificCompiler implements TerrificCompilerInterface {
*/
protected function __construct(Compiler $compiler) {
$this->compiler = $compiler;
$this->expressionHandler = ExpressionHandler::create();
}

/**
Expand Down Expand Up @@ -195,10 +196,6 @@ public function compileAndMergeVariableToContext(VariableNameAndArrayKeysPair $v
* The expression handler.
*/
public function getExpressionHandler(): ExpressionHandler {
if (!$this->expressionHandler instanceof ExpressionHandler) {
$this->expressionHandler = ExpressionHandler::create();
}

return $this->expressionHandler;
}

Expand Down

0 comments on commit 94eacc6

Please sign in to comment.