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,9 +75,13 @@ class SendmailTransport extends AbstractTransport
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
if ($this->transport) {
|
||||
return $this->transport->getName();
|
||||
}
|
||||
|
||||
return 'smtp://sendmail';
|
||||
}
|
||||
|
||||
protected function doSend(SentMessage $message): void
|
||||
{
|
||||
$this->getLogger()->debug(sprintf('Email transport "%s" starting', __CLASS__));
|
||||
|
Reference in New Issue
Block a user