1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +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

@@ -97,7 +97,7 @@ class helper
else if (function_exists('debug_backtrace'))
{
$call_stack = debug_backtrace(0);
$working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[count($call_stack) - 1]['file']));
$working_directory = str_replace(DIRECTORY_SEPARATOR, '/', dirname($call_stack[max(0, count($call_stack) - 1)]['file']));
}
else
{
@@ -156,7 +156,7 @@ class helper
}
// Return OS specific directory separators
$resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved_path);
$resolved = str_replace('/', DIRECTORY_SEPARATOR, (string) $resolved_path);
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
if (substr($resolved, -1) === DIRECTORY_SEPARATOR)