aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/filesystem
diff options
context:
space:
mode:
authorDerky <derky@phpbb.com>2018-01-04 21:20:46 +0100
committerDerky <derky@phpbb.com>2018-01-04 21:20:46 +0100
commit2fcb8ab87fb30c57b106695859c2661fc3cc2837 (patch)
tree4e2a1437ff2cc9b3ca742716047660bf0367c824 /phpBB/phpbb/filesystem
parent0ff5f9fa0edf9ac3125cc4e871609a90cee1cfac (diff)
parentc1ec6517bfe0f080ad052e727073794583464bfb (diff)
downloadforums-2fcb8ab87fb30c57b106695859c2661fc3cc2837.tar
forums-2fcb8ab87fb30c57b106695859c2661fc3cc2837.tar.gz
forums-2fcb8ab87fb30c57b106695859c2661fc3cc2837.tar.bz2
forums-2fcb8ab87fb30c57b106695859c2661fc3cc2837.tar.xz
forums-2fcb8ab87fb30c57b106695859c2661fc3cc2837.zip
Merge pull request #5069 from marc1706/ticket/14972-rhea
[ticket/14972] Backport for PHP 7.2 compatibility
Diffstat (limited to 'phpBB/phpbb/filesystem')
-rw-r--r--phpBB/phpbb/filesystem/filesystem.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/phpbb/filesystem/filesystem.php b/phpBB/phpbb/filesystem/filesystem.php
index 2112882d1d..3f39448f05 100644
--- a/phpBB/phpbb/filesystem/filesystem.php
+++ b/phpBB/phpbb/filesystem/filesystem.php
@@ -171,7 +171,7 @@ class filesystem implements filesystem_interface
continue;
}
- if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '.' && $filtered[sizeof($filtered) - 1] !== '..')
+ if ($part === '..' && !empty($filtered) && $filtered[count($filtered) - 1] !== '.' && $filtered[count($filtered) - 1] !== '..')
{
array_pop($filtered);
}
@@ -671,7 +671,7 @@ class filesystem implements filesystem_interface
else if (function_exists('debug_backtrace'))
{
$call_stack = debug_backtrace(0);
- $this->working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[sizeof($call_stack) - 1]['file']));
+ $this->working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[count($call_stack) - 1]['file']));
}
else
{
@@ -683,7 +683,7 @@ class filesystem implements filesystem_interface
//$dir_parts = explode(DIRECTORY_SEPARATOR, __DIR__);
//$namespace_parts = explode('\\', trim(__NAMESPACE__, '\\'));
- //$namespace_part_count = sizeof($namespace_parts);
+ //$namespace_part_count = count($namespace_parts);
// Check if we still loading from root
//if (array_slice($dir_parts, -$namespace_part_count) === $namespace_parts)
@@ -807,7 +807,7 @@ class filesystem implements filesystem_interface
array_pop($resolved);
$resolved_path = false;
}
- else if ($path_part === '..' && !empty($resolved) && !in_array($resolved[sizeof($resolved) - 1], array('.', '..')))
+ else if ($path_part === '..' && !empty($resolved) && !in_array($resolved[count($resolved) - 1], array('.', '..')))
{
array_pop($resolved);
$resolved_path = false;