Skip to content
Snippets Groups Projects
Commit 4c41ba44 authored by Markus Klein's avatar Markus Klein Committed by Tolleiv Nietsch
Browse files

[TASK] Improve debugTrail() to better handle includes

The deprecation log lacks specific and necessary information about
include and require calls, which makes it hard to actually follow
a stack trace.

Add special treatment of this sort of functions and display additional
path information.

Change-Id: If816432d3204454954079c636f539243eb3fa55b
Resolves: #31300
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6343
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
Reviewed-by: Wouter Wolters
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
parent c5e06a3b
No related merge requests found
......@@ -225,7 +225,12 @@ final class t3lib_utility_Debug {
$path = array();
foreach ($trail as $dat) {
$path[] = $dat['class'] . $dat['type'] . $dat['function'] . '#' . $dat['line'];
$pathFragment = $dat['class'] . $dat['type'] . $dat['function'];
// add the path of the included file
if (in_array($dat['function'], array('require', 'include', 'require_once', 'include_once'))) {
$pathFragment .= '(' . substr($dat['args'][0], strlen(PATH_site)) . '),' . substr($dat['file'], strlen(PATH_site));
}
$path[] = $pathFragment . '#' . $dat['line'];
}
return implode(' // ', $path);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment