Explicitly treat null as an empty string when interpolating.

Fixes a deprecation warning on PHP 8.1+, and saves us some unnecessary escaping calls!

Thanks for your help @scr4bble :)

Fixes #383
This commit is contained in:
Justin Hileman
2022-01-21 00:47:28 -05:00
parent 7fd191f730
commit 076209772d
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -506,7 +506,7 @@ class Mustache_Compiler
const VARIABLE = '
$value = $this->resolveValue($context->%s(%s), $context);%s
$buffer .= %s%s;
$buffer .= %s($value === null ? \'\' : %s);
';
/**