Loading src/GuardianManager.php +9 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Installer\InstallerKernel; use Drupal\Core\Logger\LoggerChannelTrait; use Drupal\Core\Mail\MailManagerInterface; use Drupal\Core\Messenger\MessengerTrait; Loading Loading @@ -127,6 +128,14 @@ final class GuardianManager implements GuardianManagerInterface { * {@inheritdoc} */ public function notifyModuleState($isEnabled) { // It is possible that guardian is installed as part of a profile installation. // In that case, the 'from' email is not yet available, and sending mails will fail. // Don't try to send mails during installation. // @see https://www.drupal.org/project/guardian/issues/3239572 if (InstallerKernel::installationAttempted()) { return; } $site = $this->configFactory->get('system.site')->get('name'); if ($isEnabled) { Loading Loading
src/GuardianManager.php +9 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Installer\InstallerKernel; use Drupal\Core\Logger\LoggerChannelTrait; use Drupal\Core\Mail\MailManagerInterface; use Drupal\Core\Messenger\MessengerTrait; Loading Loading @@ -127,6 +128,14 @@ final class GuardianManager implements GuardianManagerInterface { * {@inheritdoc} */ public function notifyModuleState($isEnabled) { // It is possible that guardian is installed as part of a profile installation. // In that case, the 'from' email is not yet available, and sending mails will fail. // Don't try to send mails during installation. // @see https://www.drupal.org/project/guardian/issues/3239572 if (InstallerKernel::installationAttempted()) { return; } $site = $this->configFactory->get('system.site')->get('name'); if ($isEnabled) { Loading