From 3a31cc0008f2cf5daa4852c14f287cb78ef44aed Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 13 Oct 2016 17:02:41 +0200 Subject: [PATCH] Check that we have a Slim container --- controllers/FrontController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 0a6bdf1..aabd740 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -7,6 +7,7 @@ namespace Alltube\Controller; use Alltube\Config; use Alltube\VideoDownload; use Interop\Container\ContainerInterface; +use Slim\Container; use Slim\Http\Request; use Slim\Http\Response; use Slim\Http\Stream; @@ -46,7 +47,9 @@ class FrontController { $this->config = Config::getInstance(); $this->download = new VideoDownload(); - $this->container = $container; + if ($container instanceof Container) { + $this->container = $container; + } } /**