Skip to content
Snippets Groups Projects
Commit 7f67a199 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge remote-tracking branch 'origin/develop' into develop

parents 856609be 0f5af6c3
No related branches found
No related tags found
1 merge request!247Merging develop into main
Pipeline #1274397 passed
......@@ -101,6 +101,9 @@
"drupal/dynamic_entity_reference": {
"#3099176 Errors when new entity types are added": "https://www.drupal.org/files/issues/2023-09-08/3099176-3.x-16.diff"
},
"drupal/eca": {
"#3461808 LogMessageEvent tokens not available": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3461808.diff"
},
"drupal/elasticsearch_connector": {
"#2952301 Flatten keys": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/elasticsearch_connector.patch"
},
......@@ -217,9 +220,6 @@
"drupal/svg_image_field": {
"#3090673 URL field formatter": "https://www.drupal.org/files/issues/2019-10-29/3090673-2.svg_image_field.Add-support-for-a-URL-image-formatter.patch"
},
"drupal/symfony_mailer_lite": {
"#3432768 Type casting": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3432768.diff"
},
"drupal/tamper": {
"#3279973 WordCount plugin": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3279973.diff",
"#3268276 Timezone plugin": "https://www.drupal.org/files/issues/2023-04-06/0001-Issue-3268276-Reworking-timezones.patch"
......
......@@ -210,9 +210,6 @@
"drupal/svg_image_field": {
"#3090673 URL field formatter": "https://www.drupal.org/files/issues/2019-10-29/3090673-2.svg_image_field.Add-support-for-a-URL-image-formatter.patch"
},
"drupal/symfony_mailer_lite": {
"#3432768 Type casting": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3432768.diff"
},
"drupal/tamper": {
"#3279973 WordCount plugin": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3279973.diff",
"#3268276 Timezone plugin": "https://www.drupal.org/files/issues/2023-04-06/0001-Issue-3268276-Reworking-timezones.patch"
......
diff --git a/src/Plugin/Mail/SymfonyMailer.php b/src/Plugin/Mail/SymfonyMailer.php
index f19cb2c3a36f15e54dffc0a66613cdb6d7a89334..cb5bca08d17ed28e28625e18b4f429b1cf0f83e7 100644
--- a/src/Plugin/Mail/SymfonyMailer.php
+++ b/src/Plugin/Mail/SymfonyMailer.php
@@ -268,7 +268,7 @@ class SymfonyMailer implements MailInterface, ContainerFactoryPluginInterface {
$this->normalizeHeaders($message);
if (!empty($message['headers']) && is_array($message['headers'])) {
foreach ($message['headers'] as $header_key => $header_value) {
- if (empty($header_key) || in_array($header_key, $headers_to_skip, FALSE)) {
+ if (empty($header_value) || empty($header_key) || in_array($header_key, $headers_to_skip, FALSE)) {
continue;
}
diff --git a/modules/log/src/Event/LogMessageEvent.php b/modules/log/src/Event/LogMessageEvent.php
index 485a8f9f..875590cc 100644
--- a/modules/log/src/Event/LogMessageEvent.php
+++ b/modules/log/src/Event/LogMessageEvent.php
@@ -2,7 +2,6 @@
namespace Drupal\eca_log\Event;
-use Drupal\eca\Plugin\DataType\DataTransferObject;
use Symfony\Contracts\EventDispatcher\Event;
/**
@@ -37,13 +36,6 @@ class LogMessageEvent extends Event {
*/
protected array $context;
- /**
- * An instance holding log data accessible as token.
- *
- * @var \Drupal\eca\Plugin\DataType\DataTransferObject|null
- */
- protected ?DataTransferObject $logData = NULL;
-
/**
* Construct a LogMessageEvent.
*
@@ -90,14 +82,4 @@ class LogMessageEvent extends Event {
return $this->context;
}
- /**
- * Get the log data.
- *
- * @return \Drupal\eca\Plugin\DataType\DataTransferObject|null
- * The log data or NULL.
- */
- public function getLogData(): ?DataTransferObject {
- return $this->logData;
- }
-
}
diff --git a/modules/log/src/Plugin/ECA/Event/LogEvent.php b/modules/log/src/Plugin/ECA/Event/LogEvent.php
index 5f9cf751..e23ecb72 100644
--- a/modules/log/src/Plugin/ECA/Event/LogEvent.php
+++ b/modules/log/src/Plugin/ECA/Event/LogEvent.php
@@ -28,6 +28,13 @@ use Symfony\Contracts\EventDispatcher\Event;
*/
class LogEvent extends EventBase {
+ /**
+ * An instance holding log data accessible as token.
+ *
+ * @var \Drupal\eca\Plugin\DataType\DataTransferObject|null
+ */
+ protected ?DataTransferObject $logData = NULL;
+
/**
* {@inheritdoc}
*/
@@ -142,10 +149,10 @@ class LogEvent extends EventBase {
public function getData(string $key): mixed {
$event = $this->event;
if ($key === 'log' && $event instanceof LogMessageEvent) {
- if ($logData = $event->getLogData()) {
+ if ($this->logData === NULL) {
$message = str_replace('@backtrace_string', '', $event->getMessage());
$context = $this->cleanupIterableForDto($event->getContext());
- $logData = DataTransferObject::create([
+ $this->logData = DataTransferObject::create([
'severity' => DataTransferObject::create($event->getSeverity()),
'message' => [
'raw' => DataTransferObject::create($event->getMessage()),
@@ -154,7 +161,7 @@ class LogEvent extends EventBase {
'context' => DataTransferObject::create($context),
]);
}
- return $logData;
+ return $this->logData;
}
return parent::getData($key);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment