avoid creating expensive stacktrace in dbg_deprecated()
now the method is aborting early again unless the data is actually used
This commit is contained in:
parent
adda4e936d
commit
8533108670
|
@ -441,8 +441,16 @@ function dbglog($msg,$header=''){
|
|||
* Log accesses to deprecated fucntions to the debug log
|
||||
*
|
||||
* @param string $alternative The function or method that should be used instead
|
||||
* @triggers INFO_DEPRECATION_LOG
|
||||
*/
|
||||
function dbg_deprecated($alternative = '') {
|
||||
global $conf;
|
||||
global $EVENT_HANDLER;
|
||||
if(!$conf['allowdebug'] && !$EVENT_HANDLER->hasHandlerForEvent('INFO_DEPRECATION_LOG')) {
|
||||
// avoid any work if no one cares
|
||||
return;
|
||||
}
|
||||
|
||||
$backtrace = debug_backtrace();
|
||||
array_shift($backtrace);
|
||||
$self = $backtrace[0];
|
||||
|
|
Loading…
Reference in New Issue