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

Normalization of arrays containing self references #808

Merged
merged 2 commits into from
Jul 2, 2016

Conversation

naderman
Copy link
Contributor

This is an issue in particular when $GLOBALS gets stuck into $context. This is something Symfony's ErrorHandler does when an error is thrown in global scope. The result is infinite recusion resulting in stack overflow on normalize().

Currently only adds a failing test.

Options are

  • Limit nesting, by introducing depth counting to normalize()
  • Reference detection (more complicated and uses more memory)

@naderman
Copy link
Contributor Author

Limited depth to a hardcoded value of 9, as an implementation of option 1.

@Seldaek
Copy link
Owner

Seldaek commented Jul 2, 2016

Thanks

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

Successfully merging this pull request may close these issues.

3 participants