From fe2890925eeacb2708c7f13204ea71fdca293183 Mon Sep 17 00:00:00 2001 From: Loilo Date: Wed, 25 Mar 2020 23:51:04 +0100 Subject: [PATCH] Prevent generation of invalid code for certain parameter default values --- src/Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Method.php b/src/Method.php index 028e1b7..7bc6b7e 100644 --- a/src/Method.php +++ b/src/Method.php @@ -329,7 +329,7 @@ class Method } elseif (is_resource($default)) { //skip to not fail } else { - $default = "'" . trim($default) . "'"; + $default = var_export($default, true); } $paramStr .= " = $default"; }