From 77180ebb0c7c72a7fcb3a01aca688f2f643e8c50 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 12 Sep 2023 14:19:10 +0200 Subject: [PATCH] Fix error in the doublons queries --- .../Remove/Handler/PersonMoveRelationHandler.php | 10 +++++----- .../ChillPersonBundle/Actions/Remove/PersonMove.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveRelationHandler.php b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveRelationHandler.php index 22c65a43d..29f5f4199 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveRelationHandler.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveRelationHandler.php @@ -37,11 +37,11 @@ class PersonMoveRelationHandler implements PersonMoveSqlHandlerInterface ); SQL, $from->getId(), $from->getId(), $to->getId(), $from->getId(), $from->getId(), $to->getId()); - $deleteSql = sprintf(<<<'SQL' - DELETE FROM chill_person_relationships WHERE fromperson_id = %d; - DELETE FROM chill_person_relationships WHERE toperson_id = %d; - SQL, $from->getId(), $from->getId()); + $deleteSql = [ + sprintf("DELETE FROM chill_person_relationships WHERE fromperson_id = %d", $from->getId()), + sprintf("DELETE FROM chill_person_relationships WHERE toperson_id = %d" , $from->getId()) + ]; - return [$insertSql, $deleteSql]; + return [$insertSql, ...$deleteSql]; } } diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php index 8bce56c0e..8c155cb2a 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php @@ -111,7 +111,7 @@ class PersonMove $this->getTableName($personMetadata), $from->getId() ); - + return $sqls; }