From 803fd670cd4b8b3c4fd324725692e51a1e4fe2b0 Mon Sep 17 00:00:00 2001 From: klkvsk Date: Thu, 11 Jul 2013 14:13:40 +0400 Subject: [PATCH] fix use var_export for default params in function (nulls and empty arrays broke templates) --- src/Fenom/Compiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fenom/Compiler.php b/src/Fenom/Compiler.php index d27361b..4fa8d9e 100644 --- a/src/Fenom/Compiler.php +++ b/src/Fenom/Compiler.php @@ -615,7 +615,7 @@ class Compiler { } elseif(isset($params[ $param->getPosition() ])) { $args[] = $params[ $param->getPosition() ]; } elseif($param->isOptional()) { - $args[] = $param->getDefaultValue(); + $args[] = var_export($param->getDefaultValue(), true); } } return "$function(".implode(", ", $args).')';