diff --git a/Hyper-V/VMs-Backups.php b/Hyper-V/VMs-Backups.php index 28577a3..db21a56 100644 --- a/Hyper-V/VMs-Backups.php +++ b/Hyper-V/VMs-Backups.php @@ -145,7 +145,7 @@ // Backup OK $answers = Invoke_infra("SELECT * FROM VMs_Backup where ( Owner like 'DUN-VMH%' or Owner like 'MDK-VMH%' ) and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and LastResult = 'OK' and TRY_CAST(lastknowngood AS DATE) >= CAST(DATEADD(DAY, -2, GETDATE()) AS DATE) order by name"); - $total = count($answers); + $total = is_countable($answers) ? count($answers) : 0; foreach ($answers as $row) { $date1 = date_create($row['LastKnownGood']); $diff = date_diff($date1, date_create(date("Y-m-d"))); if(date('w') >= 2 && date('w') <= 6 ){ diff --git a/Hyper-V/clusters.php b/Hyper-V/clusters.php index 8e92781..bcc3a48 100644 --- a/Hyper-V/clusters.php +++ b/Hyper-V/clusters.php @@ -45,7 +45,7 @@