Skip to content
Browse files

Fixed potential bug with empty default parameters on route placeholders

  • Loading branch information...
1 parent 7c2f919 commit 504a1fdaa0bc3c57fe3acfe41977aa6df9800fe0 @rikh42 committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 routing/Route.php
View
2 routing/Route.php
@@ -306,7 +306,7 @@ public function generate($args=null)
$value = $this->cleanArgument($args[$var], $type);
} else {
// no argument provided
- if ($this->defaults[$var] != null) {
+ if (array_key_exists($var, $this->defaults)) {
// Use the default value
$value = $this->cleanArgument($this->defaults[$var], $type);
} else {

0 comments on commit 504a1fd

Please sign in to comment.
Something went wrong with that request. Please try again.