-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Description
Laravel Version
12.42.0
PHP Version
8.5.0
Database Driver & Version
MySQL 8.0.42
Description
When running php artisan schedule:run, an ErrorException: Undefined variable $result is thrown in Container.php.
The error occurs in the following code path:
if ($this->resolved($abstract)) {
$this->rebound($abstract);
}
return $result; // <-- $result is undefinedIt appears that $result is being returned without being defined in certain code paths within the Container class.
Steps To Reproduce
Run php artisan schedule:run (the exact trigger may vary)
The error is thrown from Illuminate\Container\Container.php
Stack Trace:
ErrorException: Undefined variable $result
vendor/laravel/framework/src/Illuminate/Container/Container.php
in Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
Environment
Expected Behavior
The container method should properly initialize and return $result in all code paths without throwing an undefined variable error.
Additional Context
This error was captured in production via error monitoring. The breadcrumbs show:
artisan.command → Finished artisan command: schedule:run
The error triggers during the command execution lifecycle