mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
fix for PHP warning "is_file(): open_basedir restriction in effect"
Example: PHP Warning: is_file(): open_basedir restriction in effect. File(/home/users/.../user/plugins/.gitkeep/.gitkeep.yaml) is not within the allowed path(s): (/home/users/.../:/usr/share/pear/) in .../web/system/src/Grav/Common/Config.php:237
This commit is contained in:
@@ -232,9 +232,10 @@ class Config extends Data
|
||||
/** @var \DirectoryIterator $plugin */
|
||||
foreach ($iterator as $plugin) {
|
||||
$name = $plugin->getBasename();
|
||||
$file = $plugin->getPathname() . DS . $name . YAML_EXT;
|
||||
$dir = $plugin->getPathname() ;
|
||||
$file = $dir . DS . $name . YAML_EXT;
|
||||
|
||||
if (!is_file($file)) {
|
||||
if (!(is_dir($dir) && is_file($file))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user