mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15253] PHP 7.2 compatibility
PHPBB3-15253
This commit is contained in:
parent
9b28b21f9a
commit
01a28d0bd4
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ class helper
|
||||||
continue;
|
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);
|
array_pop($filtered);
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ class helper
|
||||||
else if (function_exists('debug_backtrace'))
|
else if (function_exists('debug_backtrace'))
|
||||||
{
|
{
|
||||||
$call_stack = debug_backtrace(0);
|
$call_stack = debug_backtrace(0);
|
||||||
$working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[sizeof($call_stack) - 1]['file']));
|
$working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[count($call_stack) - 1]['file']));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -109,7 +109,7 @@ class helper
|
||||||
//$dir_parts = explode(DIRECTORY_SEPARATOR, __DIR__);
|
//$dir_parts = explode(DIRECTORY_SEPARATOR, __DIR__);
|
||||||
//$namespace_parts = explode('\\', trim(__NAMESPACE__, '\\'));
|
//$namespace_parts = explode('\\', trim(__NAMESPACE__, '\\'));
|
||||||
|
|
||||||
//$namespace_part_count = sizeof($namespace_parts);
|
//$namespace_part_count = count($namespace_parts);
|
||||||
|
|
||||||
// Check if we still loading from root
|
// Check if we still loading from root
|
||||||
//if (array_slice($dir_parts, -$namespace_part_count) === $namespace_parts)
|
//if (array_slice($dir_parts, -$namespace_part_count) === $namespace_parts)
|
||||||
|
@ -261,7 +261,7 @@ class helper
|
||||||
array_pop($resolved);
|
array_pop($resolved);
|
||||||
$resolved_path = false;
|
$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);
|
array_pop($resolved);
|
||||||
$resolved_path = false;
|
$resolved_path = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue