Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Fixed "Commands out of sync; you can't run this command now" #116

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/SaveHandler/DbTableGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public function write($id, $data)
$rows = $this->tableGateway->select([
$this->options->getIdColumn() => $id,
$this->options->getNameColumn() => $this->sessionName,
]);
])->current();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes like these require a failing test case validating that the bug was present and fixed afterwards.


if ($rows->current()) {
if ($rows) {
return (bool) $this->tableGateway->update($data, [
$this->options->getIdColumn() => $id,
$this->options->getNameColumn() => $this->sessionName,
Expand Down