EasyCorp/easy-log-handler

Uncaught exception

TheBabaYaga opened this issue · 4 comments

When I use die(dump('text here')); in a Symfony command I get:

string(9) "text here" PHP Fatal error: Uncaught exception 'Symfony\Component\Debug\Exception\ContextErrorException' with message 'Notice: Use of undefined constant ARRAY_FILTER_USE_KEY - assumed 'ARRAY_FILTER_USE_KEY'' in /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php:494 Stack trace: #0 /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php(494): Symfony\Component\Debug\ErrorHandler->handleError(8, 'Use of undefine...', '/srv/spencer-bl...', 494, Array) #1 /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php(267): EasyCorp\EasyLog\EasyLogFormatter->filterVariablesUsedAsPlaceholders('The Sonata\Medi...', Array) #2 /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php(337): EasyCorp\EasyLog\EasyLogFormatter->formatContext(Array) #3 /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php(60): EasyCorp\EasyLog\EasyLogFormatter->formatRecord(Array, 0) #4 /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogHandler.php(29): EasyCo in /srv/spencer-blue/vendor/easycorp/easy-log-handler/src/EasyLogFormatter.php on line 494

Thanks for reporting this issue! This constant was added in PHP 5.6 ... This could be the cause of the problem that you reported in #2. I'm going to send a pull request right away. Thanks!

Ah yup, I am on PHP 5.5.9 :) Thanks!

A new version (1.0.1) has been released. Please try to update it and see if the error is gone. Thanks.

Ok, I'll try to do it asap. I'll let you know!