Commit cef7375bb2d56445e15be25aabd8278ac64c7867
1 parent
86323a97
Exists in
master
and in
111 other branches
EpnTapMgr: Fix warnings when creating non_empty_values dictionnary.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
php/classes/EpnTapMgr.php
@@ -64,7 +64,7 @@ class EpnTapMgr { | @@ -64,7 +64,7 @@ class EpnTapMgr { | ||
64 | $result[$i]['time_max'] = $this->JDTodate($result[$i]['time_max']); | 64 | $result[$i]['time_max'] = $this->JDTodate($result[$i]['time_max']); |
65 | 65 | ||
66 | foreach($result[$i] as $key => $value) { | 66 | foreach($result[$i] as $key => $value) { |
67 | - $non_empty_values[$key] = $non_empty_values[$key] || $value === '' || $value === 'NAN'; | 67 | + $non_empty_values[$key] = (array_key_exists($key, $non_empty_values) ? $non_empty_values[$key] : False) || $value === '' || $value === 'NAN'; |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
@@ -72,7 +72,7 @@ class EpnTapMgr { | @@ -72,7 +72,7 @@ class EpnTapMgr { | ||
72 | for ($i = 0 ; $i < count($result) ; $i++) { | 72 | for ($i = 0 ; $i < count($result) ; $i++) { |
73 | $result[$i] = array_diff_key($result[$i], array_flip($non_null_cols)); | 73 | $result[$i] = array_diff_key($result[$i], array_flip($non_null_cols)); |
74 | } | 74 | } |
75 | - | 75 | + // error_log('Query result: ' . json_encode($result)); |
76 | return $result; | 76 | return $result; |
77 | } | 77 | } |
78 | 78 |