From 0e0639b1294cd5e544ab2abcd54803ea10bd8ab0 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 --- src/Symfony/Component/Debug/Exception/FatalErrorException.php | 3 +-- src/Symfony/Component/ErrorHandler/Error/FatalError.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Debug/Exception/FatalErrorException.php b/src/Symfony/Component/Debug/Exception/FatalErrorException.php index a9fd7bb9defdf..fbdad4c5671d7 100644 --- a/src/Symfony/Component/Debug/Exception/FatalErrorException.php +++ b/src/Symfony/Component/Debug/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); } diff --git a/src/Symfony/Component/ErrorHandler/Error/FatalError.php b/src/Symfony/Component/ErrorHandler/Error/FatalError.php index 98490b5accc41..57fc690e26d6c 100644 --- a/src/Symfony/Component/ErrorHandler/Error/FatalError.php +++ b/src/Symfony/Component/ErrorHandler/Error/FatalError.php @@ -33,8 +33,7 @@ public function __construct(string $message, int $code, array $error, int $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); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy