diff --git a/src/Service/RedmineService.php b/src/Service/RedmineService.php index 7577fac..e00eab9 100644 --- a/src/Service/RedmineService.php +++ b/src/Service/RedmineService.php @@ -359,7 +359,7 @@ class RedmineService 'json' => ['issue' => $data], ]); - if (200 !== $response->getStatusCode()) { + if (200 !== $response->getStatusCode() && 204 !== $response->getStatusCode()) { if (401 === $response->getStatusCode()) { throw new \RuntimeException('Erreur Redmine ('.$response->getStatusCode().') : Opération non autorisée, avez-vous placé votre apikey redmine sur votre profil'); } @@ -367,7 +367,7 @@ class RedmineService throw new \RuntimeException('Erreur de communication avec Redmine : '.$response->getStatusCode()); } - return $response->toArray(); + return []; } catch (TransportExceptionInterface $e) { throw new \RuntimeException('Erreur de communication avec Redmine : '.$e->getMessage()); } diff --git a/templates/issue/view.html.twig b/templates/issue/view.html.twig index 122f4b7..47aefef 100644 --- a/templates/issue/view.html.twig +++ b/templates/issue/view.html.twig @@ -9,11 +9,13 @@