From 8330f26958a80a3580f51e18da934a68fe948cf7 Mon Sep 17 00:00:00 2001 From: Dieter Holvoet Date: Sun, 21 Aug 2022 13:47:30 +0200 Subject: [PATCH] Exclude non-placeholder variables --- src/Drupal/Commands/core/DeployHookCommands.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Drupal/Commands/core/DeployHookCommands.php b/src/Drupal/Commands/core/DeployHookCommands.php index 9bcbb0a761..746ec095fe 100644 --- a/src/Drupal/Commands/core/DeployHookCommands.php +++ b/src/Drupal/Commands/core/DeployHookCommands.php @@ -194,7 +194,9 @@ public static function updateDoOneDeployHook(string $function, DrushBatchContext Drush::logger()->error($e->getMessage()); $variables = Error::decodeException($e); - unset($variables['backtrace']); + $variables = array_filter($variables, function ($key) { + return $key[0] == '@' || $key[0] == '%'; + }, ARRAY_FILTER_USE_KEY); // On windows there is a problem with json encoding a string with backslashes. $variables['%file'] = strtr($variables['%file'], [DIRECTORY_SEPARATOR => '/']); $ret['#abort'] = [