Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught TypeError: substr() #1511

Closed
HendrikCromboom opened this issue Nov 5, 2020 · 4 comments
Closed

Fatal error: Uncaught TypeError: substr() #1511

HendrikCromboom opened this issue Nov 5, 2020 · 4 comments
Labels

Comments

@HendrikCromboom
Copy link

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

@HendrikCromboom
Copy link
Author

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

@HendrikCromboom
Copy link
Author

Rolling back to previous stable candidate solves the issue.

@grubolsch
Copy link
Contributor

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?

@Seldaek
Copy link
Owner

Seldaek commented Dec 10, 2020

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.

@Seldaek Seldaek closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants