Skip to content

Commit

Permalink
wrap middleware instances into arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Aug 18, 2016
1 parent daa5dbe commit fd73470
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/MiddlewareQueue.php
Expand Up @@ -145,7 +145,7 @@ public function prepend($middleware)
*/
public function insertAt($index, $middleware)
{
array_splice($this->queue, $index, 0, $middleware);
array_splice($this->queue, $index, 0, [$middleware]);

return $this;
}
Expand All @@ -159,7 +159,7 @@ public function insertAt($index, $middleware)
* @param string $class The classname to insert the middleware before.
* @param callable|string $middleware The middleware to insert.
* @return $this
* @throws \LogicException If middlware to insert before is not found.
* @throws \LogicException If middleware to insert before is not found.
*/
public function insertBefore($class, $middleware)
{
Expand Down

0 comments on commit fd73470

Please sign in to comment.