From 2d793f45f3c5d7a6d58f90f15daa99281d00a385 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Tue, 7 Jul 2020 10:50:58 +0200
Subject: [PATCH] :ambulance: fix(errors) Show previous throwable trace in
 fatal errors

issue #6071
---
 include/errors/class_FatalError.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/errors/class_FatalError.inc b/include/errors/class_FatalError.inc
index ae4841c20..4f2b8547d 100644
--- a/include/errors/class_FatalError.inc
+++ b/include/errors/class_FatalError.inc
@@ -84,6 +84,10 @@ class FatalError extends Error
       $config->get_cfg_value('displayerrors') == 'TRUE') {
       $trace    = FusionDirectoryError::formatTrace($this);
       $display  .= print_a($trace, TRUE);
+      $previous = $this;
+      while ($previous = $previous->getPrevious()) {
+        $display .= print_a(FusionDirectoryError::formatTrace($previous), TRUE);
+      }
     }
 
     $display .= '</body></html>';
-- 
GitLab