Skip to content

[SecurityBundle] Fix the datacollector to properly support decision.object being null #24829

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

Merged
merged 1 commit into from
Nov 6, 2017
Merged

[SecurityBundle] Fix the datacollector to properly support decision.object being null #24829

merged 1 commit into from
Nov 6, 2017

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented Nov 5, 2017

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24804
License MIT
Doc PR N/A

Similar to #23050, when accessing a Data clone property through __get() and the value is null for instance, you'll really get null instead of a Data instance. The solution is to use seek instead whenever we access and try to use profiler_dump on a Data property that can be a simple scalar like null or false. AFAIK, decision.object is the only one here.

@fabpot
Copy link
Member

fabpot commented Nov 6, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit 769a5f2 into symfony:3.3 Nov 6, 2017
fabpot added a commit that referenced this pull request Nov 6, 2017
…rt decision.object being null (ogizanagi)

This PR was merged into the 3.3 branch.

Discussion
----------

[SecurityBundle] Fix the datacollector to properly support decision.object being null

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #24804 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Similar to #23050, when accessing a `Data` clone property through `__get()` and the value is `null` for instance, you'll really get `null` instead of a `Data` instance. The solution is to use `seek` instead whenever we access and try to use `profiler_dump` on a `Data` property that can be a simple scalar like `null` or `false`. AFAIK, `decision.object` is the only one here.

Commits
-------

769a5f2 [SecurityBundle] Fix the datacollector to properly support decision.object being null
@ogizanagi ogizanagi deleted the fix/3.3/security_datacollector_seek branch November 6, 2017 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants