fix getName() when transport is null
This commit is contained in:
parent
233562f034
commit
ee4192ebc7
@ -39,8 +39,6 @@ abstract class AbstractTransport implements TransportInterface
|
||||
$this->logger = $logger ?: new NullLogger();
|
||||
}
|
||||
|
||||
abstract public function getName(): string;
|
||||
|
||||
/**
|
||||
* Sets the maximum number of messages to send per second (0 to disable).
|
||||
*/
|
||||
|
@ -75,7 +75,11 @@ class SendmailTransport extends AbstractTransport
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->transport->getName();
|
||||
if ($this->transport) {
|
||||
return $this->transport->getName();
|
||||
}
|
||||
|
||||
return 'smtp://sendmail';
|
||||
}
|
||||
|
||||
protected function doSend(SentMessage $message): void
|
||||
|
Reference in New Issue
Block a user