From 6bbd32a75ccf7d12e427faa29628e16298d45365 Mon Sep 17 00:00:00 2001 From: Rephl3x Date: Thu, 29 Jan 2026 11:32:17 +1300 Subject: [PATCH] Fix Count errors in preview/zone helpers --- certy.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/certy.ps1 b/certy.ps1 index 095e099..7696fad 100644 --- a/certy.ps1 +++ b/certy.ps1 @@ -72,7 +72,7 @@ function Get-FilePreview { function Get-CommonZoneFromHosts { param([string[]]$Hosts) - $fqdnHosts = $Hosts | Where-Object { $_ -and $_.Contains(".") } + $fqdnHosts = @($Hosts | Where-Object { $_ -and $_.Contains(".") }) if (-not $fqdnHosts -or $fqdnHosts.Count -eq 0) { return "" } $commonSuffix = $null @@ -852,7 +852,7 @@ $replicationEnabledBox.Add_CheckedChanged({ $filePreviewBtn.Add_Click({ $path = $fileBox.Text.Trim() if ([string]::IsNullOrWhiteSpace($path)) { - $previewHosts = Split-List $hostsBox.Text + $previewHosts = @(Split-List $hostsBox.Text) if ($previewHosts.Count -gt 0) { $filePreviewBox.Text = ($previewHosts | Select-Object -First 200) -join [Environment]::NewLine return