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) {