From 3f8b4eb0c2642a4ea864947aae81b883479dfef9 Mon Sep 17 00:00:00 2001 From: millken Date: Sat, 15 Sep 2018 12:32:38 +0800 Subject: [PATCH] fix no static-files config error --- src/Application/Factory/SwooleApplicationFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/Factory/SwooleApplicationFactory.php b/src/Application/Factory/SwooleApplicationFactory.php index 3fd4529..d988cfc 100644 --- a/src/Application/Factory/SwooleApplicationFactory.php +++ b/src/Application/Factory/SwooleApplicationFactory.php @@ -94,7 +94,7 @@ public function build(ContainerInterface $container) $routes = new CallbackCollection($container->get('routes'), $routeCallback); $app = new SwooleApplication( - $container->get('static-files'), + $container->has('static-files') ? $container->get('static-files') : [], $routes, $container->has(RequestHandlerInterface::class) ? $container->get(RequestHandlerInterface::class) : null,