bug #15389 [securityBundle] Compare roles strictly when computing inherited roles (bokonet)

This PR was merged into the 2.7 branch.

Discussion
----------

[securityBundle] Compare roles strictly when computing inherited roles

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15377
| License       | MIT
| Doc PR        |

Commits
-------

5179acc fix issue #15377
This commit is contained in:
Fabien Potencier 2015-08-01 08:58:26 +02:00
commit 4c649dcb26

View File

@ -71,7 +71,7 @@ class SecurityDataCollector extends DataCollector
if (null !== $this->roleHierarchy) {
$allRoles = $this->roleHierarchy->getReachableRoles($assignedRoles);
foreach ($allRoles as $role) {
if (!in_array($role, $assignedRoles)) {
if (!in_array($role, $assignedRoles, true)) {
$inheritedRoles[] = $role;
}
}