Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 25, 2022
1 parent 77c10d8 commit cb953c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Support/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ public function setCurrentStepName(string $currentStepName): self

public function forStep(string $stepName): array
{
return $this->allState[$stepName] ?? [];
$state = $this->allState[$stepName] ?? [];

if (array_key_exists('allStepsState', $state)) {
unset($state['allStepsState']);
}

return $state;
}

public function get(string $key)
Expand Down

0 comments on commit cb953c9

Please sign in to comment.