-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[3.1][Security] Fix DebugAccessDecisionManager when object is not a scalar #18949
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
[3.1][Security] Fix DebugAccessDecisionManager when object is not a scalar #18949
Conversation
romainneutron
commented
Jun 2, 2016
Q | A |
---|---|
Branch? | 3.1 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | N/A |
License | MIT |
👍 |
I've not added test because this class is not tested at all. If you want, I can add some |
would be great to add some tests, yeah |
return sprintf('%s (%s)', gettype($object), $object); | ||
if (is_scalar($object)) { | ||
return sprintf('%s (%s)', gettype($object), $object); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
is useless
f85b568
to
ce015c0
Compare
PR updated, tests added |
ce015c0
to
c916783
Compare
{ | ||
$object = new \stdClass(); | ||
|
||
yield [[['attributes' => ['ATTRIBUTE_1'], 'object' => 'NULL', 'result' => false]], null]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't use the short array syntax in Symfony
8976fd1
to
af15dfb
Compare
PR updated, comments addressed |
af15dfb
to
ff2d189
Compare
Thank you @romainneutron. |
… is not a scalar (romainneutron) This PR was merged into the 3.1 branch. Discussion ---------- [3.1][Security] Fix DebugAccessDecisionManager when object is not a scalar | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT Commits ------- ff2d189 [Security] Fix DebugAccessDecisionManager when object is not a scalar