diff --git a/typo3/sysext/core/Classes/Error/DebugExceptionHandler.php b/typo3/sysext/core/Classes/Error/DebugExceptionHandler.php
index ed1a740a14ff4eb5a06147445f04bc823b009559..9f60587f7fec3f2c90659ea6b2f84a49505adbe1 100644
--- a/typo3/sysext/core/Classes/Error/DebugExceptionHandler.php
+++ b/typo3/sysext/core/Classes/Error/DebugExceptionHandler.php
@@ -394,7 +394,7 @@ STYLESHEET;
 
         foreach ($trace as $index => $step) {
             $content .= '<div class="trace-step">';
-            $args = $this->flattenArgs($step['args']);
+            $args = $this->flattenArgs($step['args'] ?? []);
 
             if (isset($step['function'])) {
                 $content .= '<div class="trace-call">' . sprintf(