Commit 9a162a07 authored by Gerald Salin's avatar Gerald Salin
Browse files

check array existence before using it

parent 30ff1b53
......@@ -50,11 +50,13 @@ class tx_nG6_utils {
// Create relationships
$h_analysis = array();
foreach($tree_analyze as $analyze_id => $analyze_infos) {
if ($analyze_infos["data"]["parent_id"] == 0) {
$h_analysis[$analyze_id] = &$tree_analyze[$analyze_id];
} else {
$tree_analyze[$analyze_infos["data"]["parent_id"]]["child"][$analyze_id] = &$tree_analyze[$analyze_id];
if(is_array($tree_analyze)){
foreach($tree_analyze as $analyze_id => $analyze_infos) {
if ($analyze_infos["data"]["parent_id"] == 0) {
$h_analysis[$analyze_id] = &$tree_analyze[$analyze_id];
} else {
$tree_analyze[$analyze_infos["data"]["parent_id"]]["child"][$analyze_id] = &$tree_analyze[$analyze_id];
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment