NULL used in template_preprocess_workflow_transition()

Created on 23 May 2023, over 1 year ago
Updated 4 March 2024, 11 months ago

After upgrading to workflow v1.7 (on a Drupal 9.5.9) I get a WSoD and following in Recent logs:

Warning: Trying to access array offset on value of type null in template_preprocess_workflow_transition() (regel 23 van /data/code/compensatiepremie/www/modules/contrib/workflow/workflow.theme.inc)
#0 /data/code/compensatiepremie/www/core/includes/bootstrap.inc(347): _drupal_error_handler_real(2, 'Trying to acces...', '/data/code/comp...', 23)
#1 /data/code/compensatiepremie/www/modules/contrib/workflow/workflow.theme.inc(23): _drupal_error_handler(2, 'Trying to acces...', '/data/code/comp...', 23)
#2 [internal function]: template_preprocess_workflow_transition(Array, 'workflow_transi...', Array)
#3 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('template_prepro...', Array)
#4 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('workflow_transi...', Array)
#5 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender(Array)
#6 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender(Array)
#7 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#8 /data/code/compensatiepremie/www/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#9 /data/code/compensatiepremie/vendor/twig/twig/src/Environment.php(418) : eval()'d code(124): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)

I prepared a small patch for it that makes it go away, and for the moment I see no adverse effects.

🐛 Bug report
Status

Fixed

Version

1.7

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024