diff --git a/src/Controller/MapApiController.php b/src/Controller/MapApiController.php index 0d7e45e..aad6475 100644 --- a/src/Controller/MapApiController.php +++ b/src/Controller/MapApiController.php @@ -103,7 +103,7 @@ class MapApiController extends AbstractController } } else { - return $this->json(["Error on represantation attribute"]); + return $this->json("Error on represantation attribute"); } $building = $floor->getBuilding(); return $this->json(['idSite' => $building->getSite()->getId(), @@ -205,7 +205,7 @@ class MapApiController extends AbstractController { $edit = $rep->findEditionById($id); if (sizeof($edit) == 0) {throw new NotFoundHttpException('Error: '.$id.' doesn\'t correspond to any edit.'); } - elseif (sizeof($places)>1) { throw new Exception('Internal Error: '.$id.' refers to more than one edit ; the BDD is corrupted.'); } + elseif (sizeof($edit)>1) { throw new Exception('Internal Error: '.$id.' refers to more than one edit ; the BDD is corrupted.'); } $rep->remove($edit[0], true); return $this->json(["removed"]); }