1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:14:03 +00:00

Merge branch '1.x' of github.com:stancl/tenancy into 1.x

This commit is contained in:
Samuel Štancl 2019-04-23 17:09:52 +02:00
commit 61c87ef08e
2 changed files with 3 additions and 7 deletions

View file

@ -25,13 +25,7 @@ class InitializeTenancy
try {
tenancy()->init();
} catch (\Exception $e) {
// Pass the exception to the onFail function if it takes any parameters.
$callback = $this->onFail;
if ((new \ReflectionFunction($callback))->getNumberOfParameters() > 0) {
$callback($e);
} else {
$callback();
}
($this->onFail)($e);
}
return $next($request);