diff --git a/src/Controller/WordpressController.php b/src/Controller/WordpressController.php index abe9864..e70f668 100644 --- a/src/Controller/WordpressController.php +++ b/src/Controller/WordpressController.php @@ -19,14 +19,12 @@ final class WordpressController extends AbstractController private $wordpress; private $indexTemplate; private $pageTemplate; - private $allowInvalidate; - public function __construct(Wordpress $wordpress, string $indexTemplate, string $pageTemplate, bool $allowInvalidate) + public function __construct(Wordpress $wordpress, string $indexTemplate, string $pageTemplate) { $this->wordpress = $wordpress; $this->indexTemplate = $indexTemplate; $this->pageTemplate = $pageTemplate; - $this->allowInvalidate = $allowInvalidate; } public function index() diff --git a/src/Resources/config/controller.yaml b/src/Resources/config/controller.yaml index 8651e2b..b52a2aa 100644 --- a/src/Resources/config/controller.yaml +++ b/src/Resources/config/controller.yaml @@ -1,4 +1,5 @@ services: Happyr\WordpressBundle\Controller\WordpressController: + autowire: true + autoconfigure: true arguments: ['@Happyr\WordpressBundle\Service\Wordpress', ~, ~, ~] - tags: ['controller.service_arguments'] diff --git a/src/Service/LocalImageUploader.php b/src/Service/LocalImageUploader.php index f26628b..6820b07 100644 --- a/src/Service/LocalImageUploader.php +++ b/src/Service/LocalImageUploader.php @@ -42,7 +42,7 @@ public function uploadImage(string $url): string // Check if file already exists if (!\file_exists($path)) { // Save the file - \mkdir(dirname($path)); + @\mkdir(\dirname($path)); \file_put_contents($path, $file); }