Permalink
Browse files

Merge branch 'hotfix/3871' into develop

Forward port #3871
  • Loading branch information...
2 parents bfedd0e + 05e0e04 commit 9b1f67e21af57d2bf2af4f437f60f09397bb37cb @weierophinney weierophinney committed Mar 11, 2013
@@ -205,10 +205,13 @@ public function delete()
$statement = $this->sql->prepareStatementForSqlObject($this->sql->delete()->where($where));
$result = $statement->execute();
- if ($result->getAffectedRows() == 1) {
+ $affectedRows = $result->getAffectedRows();
+ if ($affectedRows == 1) {
// detach from database
$this->primaryKeyData = null;
}
+
+ return $affectedRows;
}
/**
@@ -208,6 +208,7 @@ public function testDelete()
$this->rowGateway->foo = 'bar';
$affectedRows = $this->rowGateway->delete();
$this->assertFalse($this->rowGateway->rowExistsInDatabase());
+ $this->assertEquals(1, $affectedRows);
}
/**

0 comments on commit 9b1f67e

Please sign in to comment.