diff --git a/system/src/Grav/Common/Config/ConfigFileFinder.php b/system/src/Grav/Common/Config/ConfigFileFinder.php index 7980671754..83b13ec350 100644 --- a/system/src/Grav/Common/Config/ConfigFileFinder.php +++ b/system/src/Grav/Common/Config/ConfigFileFinder.php @@ -207,7 +207,7 @@ protected function detectInFolder($folder, $lookup = null) continue; } - $name = $directory->getBasename(); + $name = $directory->getFilename(); $find = ($lookup ?: $name) . '.yaml'; $filename = "{$path}/{$name}/{$find}"; diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index 6c385b8d82..f16cdcca84 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -296,17 +296,17 @@ public static function sophisticatedInstall($source_path, $install_path, $ignore { foreach (new \DirectoryIterator($source_path) as $file) { - if ($file->isLink() || $file->isDot() || in_array($file->getBasename(),$ignores)) { + if ($file->isLink() || $file->isDot() || in_array($file->getFilename(), $ignores)) { continue; } - $path = $install_path . DS . $file->getBasename(); + $path = $install_path . DS . $file->getFilename(); if ($file->isDir()) { Folder::delete($path); Folder::move($file->getPathname(), $path); - if ($file->getBasename() == 'bin') { + if ($file->getFilename() === 'bin') { foreach (glob($path . DS . '*') as $bin_file) { @chmod($bin_file, 0755); } diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index cb3b91da1f..ac0e41cb02 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -1063,7 +1063,7 @@ function ($str) { } // Ignore all files in ignore list. - if (\in_array($file->getBasename(), $this->ignore_files, true)) { + if (\in_array($filename, $this->ignore_files, true)) { continue; } diff --git a/system/src/Grav/Common/Plugins.php b/system/src/Grav/Common/Plugins.php index 5e407a905d..2a9d523811 100644 --- a/system/src/Grav/Common/Plugins.php +++ b/system/src/Grav/Common/Plugins.php @@ -33,7 +33,7 @@ public function __construct() if (!$directory->isDir()) { continue; } - $plugins[] = $directory->getBasename(); + $plugins[] = $directory->getFilename(); } natsort($plugins); diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index 8f29037dd7..bf86d8dc66 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -98,7 +98,7 @@ public function all() continue; } - $theme = $directory->getBasename(); + $theme = $directory->getFilename(); $result = self::get($theme); if ($result) {