Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 4, 2024
1 parent b6697ca commit efcdc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function laravel_or_fail($app, ?string $caller = null): Application
}

if (\is_null($caller)) {
$caller = transform(debug_backtrace()[1], function ($debug) {
$caller = transform(debug_backtrace()[1] ?? [], function ($debug) {
if (isset($debug['class']) && isset($debug['function'])) {
return \sprintf('%s::%s', $debug['class'], $debug['function']);
}
Expand All @@ -472,5 +472,5 @@ function laravel_or_fail($app, ?string $caller = null): Application
});
}

throw Exceptions\ApplicationNotAvailableException::make($caller ?? debug_backtrace()[1]['function']);
throw Exceptions\ApplicationNotAvailableException::make($caller);
}

0 comments on commit efcdc7d

Please sign in to comment.