1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Minor code improvements and housekeeping for various core classes and modules

This commit is contained in:
Ryan Cramer
2022-09-23 11:19:51 -04:00
parent d6d68d8cc0
commit b87566d0b3
39 changed files with 960 additions and 741 deletions

View File

@@ -352,7 +352,7 @@ class Debug {
$options = array_merge($defaults, $options);
if($options['limit']) $options['limit']++;
$traces = @debug_backtrace($options['flags'], $options['limit']);
$config = wire('config');
$config = wire()->config;
$rootPath = ProcessWire::getRootPath(true);
$rootPath2 = $config && $config->paths ? $config->paths->root : $rootPath;
array_shift($traces); // shift of the simpleBacktrace call, which is not needed
@@ -365,7 +365,7 @@ class Debug {
$apiVars[wireClassName($value)] = '$' . $name;
}
foreach($traces as $n => $trace) {
foreach($traces as $trace) {
if(!is_array($trace) || !isset($trace['function']) || !isset($trace['file'])) {
continue;