Skip to content
Permalink
Browse files

New check for a valid callback.

  • Loading branch information...
andretefras committed Oct 23, 2016
1 parent 577c3dc commit b6d342619e1df95fa9a8a2f26557a84f25c91771
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/Routing/RouteBuilder.php
@@ -606,6 +606,9 @@ public function redirect($route, $url, array $options = [])
public function prefix($name, $params = [], callable $callback = null)
{
if ($callback === null) {
if (!is_callable($params)) {
throw new InvalidArgumentException('A valid callback is expected');
}
$callback = $params;
$params = [];
}

0 comments on commit b6d3426

Please sign in to comment.
You can’t perform that action at this time.