diff --git a/src/Context/DebugContext.php b/src/Context/DebugContext.php index 986a7137..2b821c15 100644 --- a/src/Context/DebugContext.php +++ b/src/Context/DebugContext.php @@ -93,6 +93,9 @@ function (StepNode $step) { private function getBackground(AfterStepScope $scope) { $background = $scope->getFeature()->getBackground(); + if(!$background){ + return false; + } $stepLinesInBackground = array_map( function (StepNode $step) { return $step->getLine();