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

Toolbar::run produces incompatible data for json_encode #1779

Closed
hwiesmann opened this issue Mar 1, 2019 · 2 comments
Closed

Toolbar::run produces incompatible data for json_encode #1779

hwiesmann opened this issue Mar 1, 2019 · 2 comments

Comments

@hwiesmann
Copy link

Describe the bug
Toolbar::run json_encodes "all data required by Debug Bar". If any of the "data required by Debug Bar" (e.g. an object stored in $_SESSION) is a string containing binary data json_encode may fail. But if json_encode fails NULL is returned by Toolbar::run. This in turn means that no data will be returned.

As a test example for a string containing binary data the favicon image can be used (favicon.png).

CodeIgniter 4 version
CodeIgniter4 Alpha 2

Affected module(s)
Toolbar and History (see issue #1778).

Expected behavior, and steps to reproduce if appropriate
Toolbar::run should be able to handle strings containing binary data.

@jim-parry jim-parry added this to the 4.0.0-beta.3 milestone Mar 25, 2019
@atishhamte
Copy link
Contributor

What would be the expected output here?
Shall we skip the binary data?

@lonnieezell
Copy link
Member

Maybe replace any binary data with {binary blob} or something before json encoding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants