Skip to content

Commit

Permalink
$transportAdapter is null here
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jan 25, 2025
1 parent 3a771d5 commit 791f219
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/helpers/MailerHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use craft\mail\transportadapters\TransportAdapterInterface;
use yii\base\Event;
use yii\base\Model;
use yii\helpers\Inflector;

/**
* Class MailerHelper
Expand Down Expand Up @@ -164,13 +163,6 @@ public static function settingsReport(Mailer $mailer, ?TransportAdapterInterface
foreach ($settingsAttributes as $name) {
$transportSettings[$transportAdapter->getAttributeLabel($name)] = $transportAdapter->$name;
}
} else {
// Otherwise just output whatever public properties we have available on the transport
/** @var array $asArray */
$asArray = (array)$transportAdapter;
foreach ($asArray as $name => $value) {
$transportSettings[Inflector::camel2words($name, true)] = $value;
}
}

foreach ($transportSettings as $label => $value) {
Expand Down

0 comments on commit 791f219

Please sign in to comment.