diff --git a/src/Detector/Rendering.php b/src/Detector/Rendering.php index 344bd74..ec0df63 100644 --- a/src/Detector/Rendering.php +++ b/src/Detector/Rendering.php @@ -26,9 +26,12 @@ public function detect(): RenderingDetection } // set fallback file for Static if there is only one html file - $htmlFiles = \array_filter($this->inputs, function ($file) { - return \pathinfo($file, PATHINFO_EXTENSION) === 'html'; - }); + $htmlFiles = []; + foreach ($this->inputs as $file) { + if (\pathinfo($file, PATHINFO_EXTENSION) === 'html') { + $htmlFiles[] = $file; + } + } if (\count($htmlFiles) === 1) { return new XStatic($htmlFiles[0]);