mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Check that selected is an array
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
92eb6eb1b6
commit
6b41970e97
|
@ -875,13 +875,19 @@ class Helper
|
|||
$permission_name = $permission[$x]['permission'];
|
||||
|
||||
if ($permission[$x]['display'] === true) {
|
||||
if ($selected_arr) {
|
||||
|
||||
if (is_array($selected_arr)) {
|
||||
\Log::debug('$selected_arr is an array');
|
||||
|
||||
if (array_key_exists($permission_name, $selected_arr)) {
|
||||
\Log::debug($permission_name. ' exists in $selected_arr');
|
||||
$permissions_arr[$permission_name] = $selected_arr[$permission_name];
|
||||
} else {
|
||||
$permissions_arr[$permission_name] = '0';
|
||||
}
|
||||
|
||||
} else {
|
||||
\Log::debug('$selected_arr is NOT array');
|
||||
$permissions_arr[$permission_name] = '0';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue