Seldaek / monolog

Sends your logs to files, sockets, inboxes, databases and various web services

Home Page:https://seldaek.github.io/monolog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error: Uncaught TypeError: substr()

HendrikCromboom opened this issue · comments

Monolog version 2.1.1

Repeatable on multiple devices with fresh version:

When using BrowserConsoleHandler:

Fatal error: Uncaught TypeError: substr() expects parameter 3 to be int, null given in /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Utils.php:34 Stack trace: #0 /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Utils.php(34): substr() #1 /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(179): Monolog\Utils::substr() #2 /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(153): Monolog\Handler\BrowserConsoleHandler::handleStyles() #3 /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(70): Monolog\Handler\BrowserConsoleHandler::generateScript() #4 [internal function]: Monolog\Handler\BrowserConsoleHandler::send() #5 {main} thrown in /var/www/html/monolog-php/vendor/monolog/monolog/src/Monolog/Utils.php on line 34

Substr can be hardcoded towards a non-null value to solve this part of the issue.

Rolling back to previous stable candidate solves the issue.

I provided a bugfix for this that was merged a while again.
#1490

Was this revert for some reason, can I help out with this?

Nope the issue is that I did not release a bugfix release since it was merged. Will try and get that done soon. You can require ^2.1@dev in the meantime.