From 35227cef8255319b32914c41cf238419eec52494 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Thu, 12 Oct 2017 10:55:14 +0200 Subject: [PATCH] Fix delete sql statement. --- src/Listener/Dca/LayerDcaListener.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Listener/Dca/LayerDcaListener.php b/src/Listener/Dca/LayerDcaListener.php index 5fdf1fc..4a020c6 100644 --- a/src/Listener/Dca/LayerDcaListener.php +++ b/src/Listener/Dca/LayerDcaListener.php @@ -323,14 +323,14 @@ class LayerDcaListener extends AbstractListener $undo = $statement->fetch(); - $result = $this->connection - ->prepare('SELECT * FROM tl_leaflet_map_layer WHERE lid=?') - ->execute($dataContainer->id); + $statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE lid=:lid'); + $statement->bindValue('lid', $dataContainer->id); + $statement->execute(); $undo['data'] = deserialize($undo['data'], true); - while ($result->next()) { - $undo['data']['tl_leaflet_map_layer'][] = $result->row(); + while ($row = $statement->fetch()) { + $undo['data']['tl_leaflet_map_layer'][] = $row; } $statement = $this->connection->prepare('SELECT * FROM tl_leaflet_control_layer WHERE lid=:lid');