Skip to content

Commit

Permalink
chore: Support passing null to methods rendered via {{ }}
Browse files Browse the repository at this point in the history
  • Loading branch information
hellopablo committed Jun 20, 2024
1 parent 9c571fd commit 3f7fef2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Service/Emailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,11 @@ protected function render(string $sTemplate, $mData): string
function ($aMatches) {
$sFunction = getFromArray(1, $aMatches);
$sArgument = getFromArray(4, $aMatches);

if ($sArgument === 'null') {
$sArgument = null;
}

return function_exists($sFunction)
? call_user_func($sFunction, $sArgument)
: $aMatches[0];
Expand Down

0 comments on commit 3f7fef2

Please sign in to comment.