Skip to content

Commit dd64ab7

Browse files
authored
[11.x] Fixed attempt to call Application::routesAreCached() when application doesn't implements CachesRoutes contract. (#52761)
fixes #52760 Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 042c267 commit dd64ab7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Filesystem/FilesystemServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Filesystem;
44

5+
use Illuminate\Contracts\Foundation\CachesRoutes;
56
use Illuminate\Http\Request;
67
use Illuminate\Support\Facades\Route;
78
use Illuminate\Support\ServiceProvider;
@@ -78,7 +79,7 @@ protected function registerManager()
7879
*/
7980
protected function serveFiles()
8081
{
81-
if ($this->app->routesAreCached()) {
82+
if ($this->app instanceof CachesRoutes && $this->app->routesAreCached()) {
8283
return;
8384
}
8485

0 commit comments

Comments
 (0)