From 55f79f7c01d9b03bc7dc43cdc2ab952ff256f4c7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 8 Oct 2020 17:52:29 +0200 Subject: [PATCH] fix file_exists replacement --- Module/InstallerAbstract.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Module/InstallerAbstract.php b/Module/InstallerAbstract.php index c5cbf557e..bf74826f6 100644 --- a/Module/InstallerAbstract.php +++ b/Module/InstallerAbstract.php @@ -210,7 +210,7 @@ abstract class InstallerAbstract self::installRoutes(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/Routes.php', $file->getPath()); } } elseif ($child instanceof File) { - if (!\is_dir(__DIR__ . '/../../' . $child->getName()) + if (!\is_file(__DIR__ . '/../../' . $child->getName()) || ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName()) ) { continue; @@ -280,7 +280,7 @@ abstract class InstallerAbstract foreach ($directories as $child) { if ($child instanceof Directory) { foreach ($child as $file) { - if (!\is_file(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php')) + if (!\is_dir(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php')) || ($appInfo !== null && \basename($file->getName(), '.php') !== $appInfo->getInternalName()) ) { continue;