Skip to content

Commit

Permalink
SW-17552 - Check isDefaultValueAvailable since isOptional is not enough
Browse files Browse the repository at this point in the history
  • Loading branch information
bcremer committed Jan 24, 2017
1 parent 6113d30 commit 7c8c9a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/Library/Enlight/Hook/ProxyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function generateMethods($class)
$proxy_params .= '$' . $rp->getName();
$array_param .= '$' . $rp->getName();
$array_params .= '\'' . $rp->getName() . '\'=>' . $array_param;
if ($rp->isOptional()) {
if ($rp->isOptional() && $rp->isDefaultValueAvailable()) {
$params .= ' = ' . str_replace("\n", '', var_export($rp->getDefaultValue(), true));
}
}
Expand Down

0 comments on commit 7c8c9a0

Please sign in to comment.