1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

[ticket/17281] Update psalm config and fix issues

PHPBB3-17281
This commit is contained in:
Marc Alexander
2023-12-30 17:41:12 +01:00
parent c6c299eea4
commit 661a8a6117
42 changed files with 107 additions and 80 deletions

View File

@@ -632,7 +632,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[count($call_stack) - 1]['file']));
$this->working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[max(0, count($call_stack) - 1)]['file']));
}
else
{
@@ -686,6 +686,8 @@ class filesystem implements filesystem_interface
return false;
}
$resolved_path = (string) $resolved_path;
if (!@file_exists($resolved_path) || (!@is_dir($resolved_path . '/') && !is_file($resolved_path)))
{
return false;