Fixed DummyTaskStorage persisting outside of the storage.
continuous-integration/drone/push Build is failing Details

Awkward how that could go wrong...
This commit is contained in:
Abel Hoogeveen 2020-05-19 22:13:47 +02:00
parent 5f369c784b
commit 19f11d9c7e
No known key found for this signature in database
GPG Key ID: 96C2234920BF4292
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class DummyTaskStorage implements TaskStorage
throw new TasksException("Could not add Task to TaskStorage. Task '$taskId' already exists.");
}
$this->tasks[] = $task;
$this->tasks[] = clone $task;
return true;
}
@ -146,7 +146,7 @@ class DummyTaskStorage implements TaskStorage
{
if ($this->tasks[$i]->getId() === $taskId)
{
$this->tasks[$i] = $task;
$this->tasks[$i] = clone $task;
return true;
}
}