8000 bug #60057 [Mailer] Fix `Trying to access array offset on value of ty… · symfony/symfony@75d9991 · GitHub
[go: up one dir, main page]

Skip to content

Commit 75d9991

Browse files
committed
bug #60057 [Mailer] Fix Trying to access array offset on value of type null error by adding null checking (khushaalan)
This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Mailer] Fix `Trying to access array offset on value of type null` error by adding null checking | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix `Trying to access array offset on value of type null` error by adding null checking | License | MIT Its a very simple bug fix.. basically the `error_get_last()` doesn't have the 'message' and causing this issue: ![image](https://github.com/user-attachments/assets/95b51b87-0011-4913-a67a-ce91195d4f2e) so i just added Null Checking and it seems to be working now: ![image](https://github.com/user-attachments/assets/0d2f7dae-8854-421c-a946-10426b15ee06) this is happens when using Mailtrap and when it reaches its quota.. Commits ------- a303fba bug #60094 [DoctrineBridge] Fix support for entities that leverage native lazy objects (nicolas-grekas)
2 parents fb69921 + a303fba commit 75d9991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function readLine(): string
8787
throw new TransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
8888
}
8989
if (false === $line) {
90-
throw new TransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription()).error_get_last()['message']);
90+
throw new TransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription().error_get_last()['message'] ?? ''));
9191
}
9292
}
9393

0 commit comments

Comments
 (0)
0