Skip to content

Commit 7c8c9a0

Browse files
committed
SW-17552 - Check isDefaultValueAvailable since isOptional is not enough
1 parent 6113d30 commit 7c8c9a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/Library/Enlight/Hook/ProxyFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ protected function generateMethods($class)
286286
$proxy_params .= '$' . $rp->getName();
287287
$array_param .= '$' . $rp->getName();
288288
$array_params .= '\'' . $rp->getName() . '\'=>' . $array_param;
289-
if ($rp->isOptional()) {
289+
if ($rp->isOptional() && $rp->isDefaultValueAvailable()) {
290290
$params .= ' = ' . str_replace("\n", '', var_export($rp->getDefaultValue(), true));
291291
}
292292
}

0 commit comments

Comments
 (0)