Qual: Fix phan notices (eldy.lib)

This commit is contained in:
MDW
2025-02-04 01:17:07 +01:00
parent 5ead746511
commit fb62409ca7
2 changed files with 71 additions and 71 deletions

View File

@@ -12452,7 +12452,7 @@ function colorIsLight($stringcolor)
* Function to test if an entry is enabled or not
*
* @param int<0,1> $type_user 0=We test for internal user, 1=We test for external user
* @param array{enabled:int<0,1>,module:string,perms:string} $menuentry Array for feature entry to test
* @param array{enabled:int<0,1>,module?:string,perms:string} $menuentry Array for feature entry to test
* @param string[] $listofmodulesforexternal Array with list of modules allowed to external users
* @return int<0,2> 0=Hide, 1=Show, 2=Show gray
*/
@@ -12465,7 +12465,7 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal
if (empty($menuentry['enabled'])) {
return 0; // Entry disabled by condition
}
if ($type_user && $menuentry['module']) {
if ($type_user && array_key_exists('module', $menuentry) && $menuentry['module']) {
$tmploops = explode('|', $menuentry['module']);
$found = 0;
foreach ($tmploops as $tmploop) {