Fixed non-existent env when interpolating vars

This commit is contained in:
Anthony Axenov 2023-08-13 23:11:37 +08:00
parent 25887a47d3
commit d581afa793
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -173,7 +173,7 @@ abstract class AbstractConverter implements ConverterContract
*/
protected function interpolate(string $content): string
{
if (empty($this->vars) && $this->env->hasVars()) {
if (empty($this->vars) && !empty($this->env) && $this->env->hasVars()) {
return $content;
}
$matches = [];