Skip to content

Commit

Permalink
[11.x] Fixed attempt to call Application::routesAreCached() when ap…
Browse files Browse the repository at this point in the history
…plication doesn't implements `CachesRoutes` contract. (#52761)

fixes #52760

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Sep 12, 2024
1 parent 042c267 commit dd64ab7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Filesystem/FilesystemServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Filesystem;

use Illuminate\Contracts\Foundation\CachesRoutes;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
Expand Down Expand Up @@ -78,7 +79,7 @@ protected function registerManager()
*/
protected function serveFiles()
{
if ($this->app->routesAreCached()) {
if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) {
return;
}

Expand Down

0 comments on commit dd64ab7

Please sign in to comment.