mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 19:12:13 +00:00
Update ClassLoader.php
Fix 'must be an instance of Closure, array given' error when $closure is a object method.
This commit is contained in:
committed by
GitHub
parent
153f8630f2
commit
2a3238f30a
@@ -53,7 +53,7 @@ class ClassLoader implements IClassLoader
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws NotFoundHttpException
|
* @throws NotFoundHttpException
|
||||||
*/
|
*/
|
||||||
public function loadClosure(\Closure $closure, array $parameters)
|
public function loadClosure(Callable $closure, array $parameters)
|
||||||
{
|
{
|
||||||
if ($this->useDependencyInjection === true) {
|
if ($this->useDependencyInjection === true) {
|
||||||
$container = $this->getContainer();
|
$container = $this->getContainer();
|
||||||
|
|||||||
Reference in New Issue
Block a user