fix title role error

This commit is contained in:
Mathieu Jaumotte 2021-01-26 14:32:31 +01:00
parent b45191bd04
commit 580510e6b1
2 changed files with 2 additions and 4 deletions

View File

@ -174,9 +174,9 @@ class PermissionsGroupController extends Controller
$roleProvider = $this->roleProvider; $roleProvider = $this->roleProvider;
$roleScopesSorted = array(); $roleScopesSorted = array();
foreach($roleScopes as $roleScope) { foreach($roleScopes as $roleScope) {
/* @var $roleScope RoleScope */ /* @var $roleScope RoleScope */
$title = $roleProvider->getRoleTitle($roleScope->getRole()); $title = $roleProvider->getRoleTitle($roleScope->getRole());
var_dump($title);
$roleScopesSorted[$title][] = $roleScope; $roleScopesSorted[$title][] = $roleScope;
} }
ksort($roleScopesSorted); ksort($roleScopesSorted);

View File

@ -40,9 +40,7 @@ class RoleProvider
* *
* @var array|null * @var array|null
*/ */
private $rolesTitlesCache = []; private $rolesTitlesCache = null;
// sf4 check: mis [] au lieu de null
// pour éviter `Warning: array_key_exists() expects parameter 2 to be array, null given` L129
/** /**
* Add a role provider * Add a role provider