diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index 539462a..56e0684 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -89,12 +89,12 @@ class VideoDownload * * @return string */ - private function getProp($url, $format = null, $prop = 'dump-json', $password = null) + private function getProp($url = null, $format = null, $prop = 'dump-json', $password = null) { - $arguments = [ - '--'.$prop, - $url, - ]; + $arguments = ['--'.$prop]; + if (isset($url)) { + $arguments[] = $url; + } if (isset($format)) { $arguments[] = '-f '.$format; } diff --git a/controllers/FrontController.php b/controllers/FrontController.php index c2cd9d3..4e73858 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -79,9 +79,9 @@ class FrontController /** * FrontController constructor. * - * @param Container $container Slim dependency container - * @param Config $config Config instance - * @param array $cookies Cookie array + * @param ContainerInterface $container Slim dependency container + * @param Config $config Config instance + * @param array $cookies Cookie array */ public function __construct(ContainerInterface $container, Config $config = null, array $cookies = []) { @@ -112,7 +112,7 @@ class FrontController */ public function index(Request $request, Response $response) { - $uri = $request->getUri()->withUserInfo(null); + $uri = $request->getUri()->withUserInfo(''); $this->view->render( $response, 'index.tpl',