Search code examples
phplaravelcomposer-phpxdebugwhoops

PHP Fatal error: Uncaught Error: Call to undefined function Whoops\Exception\xdebug_is_enabled() with Laravel 5.8 and PHP 7.4


hope you're doing great, I'm working on a Laravel project I didn't work on since a couple of months, and found that anytime an exception is raised, I get the following error:

[Fri Jan 15 15:51:11 2021] PHP Fatal error: Uncaught Error: Call to undefined function Whoops\Exception\xdebug_is_enabled() in /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php:254

Stack trace:

#0 /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php(175): Whoops\Exception\Inspector->getTrace()
#1 /var/www/html/project/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(280): Whoops\Exception\Inspector->getFrames()
#2 /var/www/html/project/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(197): Whoops\Handler\PrettyPageHandler->getExceptionFrames()
#3 /var/www/html/project/vendor/filp/whoops/src/Whoops/Run.php(296): Whoops\Handler\PrettyPageHandler->handle()
#4 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(345): Whoops\Run->handleException()
#5 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(324): Illuminate\Foundation\Exceptions\Handler->renderExceptionWithWhoops()
#6 /var/www/html/project/ in /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php on line 254

Has anyone seen this error before and know a way to fix it? Thanks beforehand.


Solution

  • turns out I was facing this issue and found out that just by updating "filp/whoops": "^2.0" to "filp/whoops": "^2.9" the problem was solved.