Skip to content

Commit

Permalink
Fix the SQL syntax error when saving a page record (#219)
Browse files Browse the repository at this point in the history
* Fix the SQL syntax error when saving a page record (#217)

* Update src/EventListener/DataContainer/PageOperationListener.php

Co-authored-by: Andreas Schempp <[email protected]>

* Update src/EventListener/DataContainer/PageOperationListener.php

Co-authored-by: Andreas Schempp <[email protected]>

* CS

Co-authored-by: Andreas Schempp <[email protected]>
  • Loading branch information
qzminski and aschempp authored Jan 10, 2023
1 parent 6a5ebd6 commit 83315e1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/EventListener/DataContainer/PageOperationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,10 @@ private function resetPageAndChildren(int $pageId): void
$resetIds = Database::getInstance()->getChildRecords($pageId, 'tl_page');
$resetIds[] = $pageId;

$this->connection->update(
'tl_page',
['languageMain' => 0],
['id' => $resetIds],
['id' => Connection::PARAM_INT_ARRAY]
$this->connection->executeStatement(
'UPDATE tl_page SET languageMain = 0 WHERE id IN (?)',
[$resetIds],
[Connection::PARAM_INT_ARRAY]
);
}
}

0 comments on commit 83315e1

Please sign in to comment.