mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Fixed PHP warnings in the function 'menu_get_sec_pages'
This commit is contained in:
parent
c3db528040
commit
67899fc60e
@ -529,9 +529,14 @@ function menu_get_sec_pages($sec,$menu_hash = false) {
|
|||||||
$menu = json_decode(base64_decode($menu_hash),true);
|
$menu = json_decode(base64_decode($menu_hash),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sec2_array = array();
|
||||||
|
|
||||||
|
if (isset($sec)) {
|
||||||
|
|
||||||
// Get the sec2 of the main section
|
// Get the sec2 of the main section
|
||||||
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
$sec2_array[$menu[$sec]['sec2']] = $menu[$sec]['text'];
|
||||||
|
|
||||||
|
|
||||||
// Get the sec2 of the subsections
|
// Get the sec2 of the subsections
|
||||||
foreach ($menu[$sec]['sub'] as $k => $v) {
|
foreach ($menu[$sec]['sub'] as $k => $v) {
|
||||||
// Avoid special cases of standalone windows
|
// Avoid special cases of standalone windows
|
||||||
@ -539,13 +544,17 @@ function menu_get_sec_pages($sec,$menu_hash = false) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If this value has various parameters, we only get the first
|
// If this value has various parameters, we only get the first
|
||||||
$k = explode('&',$k);
|
$k = explode('&',$k);
|
||||||
$k = $k[0];
|
$k = $k[0];
|
||||||
|
|
||||||
|
|
||||||
$sec2_array[$k] = $v['text'];
|
$sec2_array[$k] = $v['text'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return $sec2_array;
|
return $sec2_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user