Skip to content

Commit

Permalink
Delete objects in the reverse as they were created
Browse files Browse the repository at this point in the history
  • Loading branch information
pmccarren committed Sep 1, 2014
1 parent d9a7e54 commit 0ff176c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public function isPendingOrSaved($object)
public function deleteSaved()
{
$exceptions = array();
foreach ($this->saved as $object) {
foreach (array_reverse($this->saved) as $object) {
try {
if (!$this->delete($object)) {
throw new DeleteFailedException(get_class($object));
Expand Down

0 comments on commit 0ff176c

Please sign in to comment.