Fixed DummyTaskStorage persisting outside of the storage.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Awkward how that could go wrong...
This commit is contained in:
parent
5f369c784b
commit
19f11d9c7e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue