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;
$roleScopesSorted = array();
foreach($roleScopes as $roleScope) {
/* @var $roleScope RoleScope */
$title = $roleProvider->getRoleTitle($roleScope->getRole());
var_dump($title);
$roleScopesSorted[$title][] = $roleScope;
}
ksort($roleScopesSorted);

View File

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