mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Re-adding Debug::caller() which was inadvertently removed in 9eca2d6
This commit is contained in:
parent
8b0bb8dd09
commit
26a3c1cf4a
@ -83,6 +83,16 @@ class Debug {
|
||||
|
||||
}
|
||||
|
||||
public static function caller() {
|
||||
$bt = debug_backtrace();
|
||||
$caller = $bt[2];
|
||||
$caller['line'] = $bt[1]['line'];
|
||||
$caller['file'] = $bt[1]['file'];
|
||||
if(!isset($caller['class'])) $caller['class'] = '';
|
||||
if(!isset($caller['type'])) $caller['type'] = '';
|
||||
return $caller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close out the show dumper
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user