You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:

so i just added Null Checking and it seems to be working now:

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)
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ public function readLine(): string
87
87
thrownewTransportException(sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
88
88
}
89
89
if (false === $line) {
90
-
thrownewTransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription()).error_get_last()['message']);
90
+
thrownewTransportException(sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription().error_get_last()['message'] ?? ''));
0 commit comments