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

Adding extra data in the records causes FatalError #1369

Closed
szaqal83 opened this issue Sep 2, 2019 · 2 comments
Closed

Adding extra data in the records causes FatalError #1369

szaqal83 opened this issue Sep 2, 2019 · 2 comments
Labels
Milestone

Comments

@szaqal83
Copy link

szaqal83 commented Sep 2, 2019

This code causes FatalError:
$logger->info('Adding a new user', array('0' => 'Test'));
this doesn't:
$logger->info('Adding a new user', array('a' => 'Test'));
for logger handler BrowserConsoleHandler.

@szaqal83 szaqal83 changed the title Adding extra data in the records where array keys are not strings causes FatalError Adding extra data in the records causes FatalError Sep 2, 2019
@Seldaek
Copy link
Owner

Seldaek commented Sep 4, 2019

What's the fatal error? It'd help a lot if you posted it..

@szaqal83
Copy link
Author

szaqal83 commented Sep 4, 2019

Fatal error: Uncaught TypeError: Argument 1 passed to Monolog\Handler\BrowserConsoleHandler::quote() must be of the type string, int given, called in /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php on line 220 and defined in /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php:226 Stack trace: #0 /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(220): Monolog\Handler\BrowserConsoleHandler::quote(0) #1 /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(149): Monolog\Handler\BrowserConsoleHandler::dump('Context', Array) #2 /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php(70): Monolog\Handler\BrowserConsoleHandler::generateScript() #3 [internal function]: Monolog\Handler\BrowserConsoleHandler::send() #4 {main} thrown in /var/www/html/test/ad/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php on line 226

@Seldaek Seldaek added the Bug label Sep 4, 2019
@Seldaek Seldaek added this to the 2.x milestone Sep 5, 2019
@Seldaek Seldaek closed this as completed in 4bfd341 Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants