Skip to content

Commit

Permalink
Merge pull request #795 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Develop -> Main - v2.7.0
  • Loading branch information
orakili committed May 1, 2024
2 parents 301d93a + 3aca66a commit 4f1696a
Show file tree
Hide file tree
Showing 61 changed files with 1,117 additions and 360 deletions.
18 changes: 18 additions & 0 deletions PATCHES/amazon_ses-3417090-cron-queue-14.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/Plugin/QueueWorker/AmazonSesMailQueue.php b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
index dc410504566451d20aec939de6953e6d1a6e9be9..fdc7af32ac6634c51283fb38f0227530a1772735 100644
--- a/src/Plugin/QueueWorker/AmazonSesMailQueue.php
+++ b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
@@ -29,7 +29,12 @@ class AmazonSesMailQueue extends QueueWorkerBase implements ContainerFactoryPlug
$plugin_definition
);

- $instance->setHandler($container->get('amazon_ses.handler'));
+ // Only set the handler if queueing is enabled to avoid an error when
+ // trying to run without config.
+ $enabled = \Drupal::config('amazon_ses.settings')->get('queue');
+ if ($enabled) {
+ $instance->setHandler($container->get('amazon_ses.handler'));
+ }

return $instance;
}
13 changes: 13 additions & 0 deletions PATCHES/core--drupal--3418098-php-mailer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
index 09a56006a6..1767dc4875 100644
--- a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
+++ b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
@@ -113,7 +113,7 @@ public function mail(array $message) {
$mail_body = preg_replace('@\r?\n@', $line_endings, $message['body']);
$mail_headers = $headers->toString();

- if (!$this->request->server->has('WINDIR') && !str_contains($this->request->server->get('SERVER_SOFTWARE'), 'Win32')) {
+ if (!$this->request->server->has('WINDIR') && !str_contains($this->request->server->get('SERVER_SOFTWARE', ''), 'Win32')) {
// On most non-Windows systems, the "-f" option to the sendmail command
// is used to set the Return-Path. There is no space between -f and
// the value of the return path.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"cweagans/composer-patches": "^1.7",
"drupal/admin_denied": "^2.0",
"drupal/allowed_formats": "^3",
"drupal/amazon_ses": "^3",
"drupal/aws": "dev-2.0.x",
"drupal/classy": "^1.0",
"drupal/components": "^3.0@beta",
"drupal/config_filter": "^2.2",
Expand Down
Loading

0 comments on commit 4f1696a

Please sign in to comment.