From 5f4a7d9f1aed10f8556d6c4cb83559239f38bcdf Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 7 Apr 2025 14:30:49 +0200 Subject: [PATCH] Fix retrieving extension list when there's no extension --- PhpManager/private/Get-PhpExtensionDetail.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PhpManager/private/Get-PhpExtensionDetail.ps1 b/PhpManager/private/Get-PhpExtensionDetail.ps1 index 713f9ce..78a8ac3 100644 --- a/PhpManager/private/Get-PhpExtensionDetail.ps1 +++ b/PhpManager/private/Get-PhpExtensionDetail.ps1 @@ -51,14 +51,13 @@ throw "Unable to find the file/folder $folder" } } + $somethingToInspect = $false if (Test-Path -Path $folder -PathType Container) { $subFiles = Get-ChildItem -Path $folder -Filter '*.dll' | Select-Object -ExpandProperty 'FullName' - $somethingToInspect = $null -ne $subFiles -and $subFiles.Count -gt 0 - if ($somethingToInspect) { + if ($subFiles) { $inspectorParameters += $subFiles + $somethingToInspect = $true } - } else { - $somethingToInspect = $false } } if ($somethingToInspect) {