Skip to content

Commit 9f34e50

Browse files
committed
avoid warnings in tests
1 parent af09162 commit 9f34e50

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/Functional/Transport/FileTransportForTests.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public function howManyTriesWasBefore(\Throwable $exception, Config $config): in
3939

4040
fclose($handle);
4141

42-
return count((array) $messages[getenv(self::ENV_VAR_FOR_CORRELATION_ID) ?? '']);
42+
return isset($messages[getenv(self::ENV_VAR_FOR_CORRELATION_ID) ?? '']) ?
43+
count((array) $messages[getenv(self::ENV_VAR_FOR_CORRELATION_ID) ?? '']) : 0;
4344
}
4445

4546
public function fetchUnprocessedMessages(int $batchSize = -1): ?iterable

0 commit comments

Comments
 (0)