mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed a bug in PermissionsReader in PHP 7.3
This commit is contained in:
parent
280cbc2330
commit
33a5709903
|
|
@ -1,3 +1,9 @@
|
|||
# v1.7.24
|
||||
## mm/dd/2021
|
||||
|
||||
3. [](#bugfix)
|
||||
* Fixed a bug in `PermissionsReader` in PHP 7.3
|
||||
|
||||
# v1.7.23
|
||||
## 09/29/2021
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class Security
|
|||
$options = static::getXssDefaults();
|
||||
}
|
||||
|
||||
$list = [];
|
||||
$list = [[]];
|
||||
foreach ($array as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$list[] = static::detectXssFromArray($value, $prefix . $key . '.', $options);
|
||||
|
|
@ -148,11 +148,7 @@ class Security
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($list)) {
|
||||
return array_merge(...$list);
|
||||
}
|
||||
|
||||
return $list;
|
||||
return array_merge(...$list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class PermissionsReader
|
|||
*/
|
||||
protected static function getDependencies(array $dependencies): array
|
||||
{
|
||||
$list = [];
|
||||
$list = [[]];
|
||||
foreach ($dependencies as $name => $deps) {
|
||||
$current = $deps ? static::getDependencies($deps) : [];
|
||||
$current[] = $name;
|
||||
|
|
|
|||
|
|
@ -634,7 +634,7 @@ class FolderStorage extends AbstractFilesystemStorage
|
|||
$flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS;
|
||||
|
||||
$iterator = new FilesystemIterator($path, $flags);
|
||||
$list = [];
|
||||
$list = [[]];
|
||||
/** @var SplFileInfo $info */
|
||||
foreach ($iterator as $filename => $info) {
|
||||
if (!$info->isDir() || strpos($info->getFilename(), '.') === 0) {
|
||||
|
|
@ -644,11 +644,7 @@ class FolderStorage extends AbstractFilesystemStorage
|
|||
$list[] = $this->buildIndexFromFilesystem($filename);
|
||||
}
|
||||
|
||||
if (!$list) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return count($list) > 1 ? array_merge(...$list) : $list[0];
|
||||
return array_merge(...$list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user