From 45b2136377cca5f10af858968d6079a482bca473 Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Fri, 2 Apr 2021 09:50:12 +0200 Subject: [PATCH] Avoid warning with Xdebug 3 with develop mode disabled --- Exception/FatalErrorException.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Exception/FatalErrorException.php b/Exception/FatalErrorException.php index a9fd7bb..fbdad4c 100644 --- a/Exception/FatalErrorException.php +++ b/Exception/FatalErrorException.php @@ -35,8 +35,7 @@ public function __construct(string $message, int $code, int $severity, string $f $this->setTrace($trace); } elseif (null !== $traceOffset) { - if (\function_exists('xdebug_get_function_stack')) { - $trace = xdebug_get_function_stack(); + if (\function_exists('xdebug_get_function_stack') && $trace = @xdebug_get_function_stack()) { if (0 < $traceOffset) { array_splice($trace, -$traceOffset); }