Skip to content
Snippets Groups Projects
Commit 54a9b1e9 authored by Lidia Matei's avatar Lidia Matei Committed by Yas Naoi
Browse files

Issue #3238813 by XLD, yas: Fix Notice: Undefined offset: 0 in...

Issue #3238813 by XLD, yas: Fix Notice: Undefined offset: 0 in LowUtilizationInstanceChecker->isNetworkLow()
parent ced692e0
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,9 @@ class LowUtilizationInstanceChecker {
->get('aws_cloud.settings')
->get('aws_cloud_low_utilization_instance_network_io_threshold') * 1024 * 1024;
foreach ($network_ins as $index => $network_in) {
if ($network_in + $network_outs[$index] > $threshold) {
foreach ($network_ins ?: [] as $index => $network_in) {
$network_out = !empty($network_outs[$index]) ? $network_outs[$index] : 0;
if ($network_in + $network_out > $threshold) {
$result = FALSE;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment