Fix custom query caller location being shown as DB.php in debug info

This commit is contained in:
Kijin Sung 2023-08-27 22:57:56 +09:00
parent 0f0dbbb40c
commit dc492345da

View file

@ -1189,7 +1189,7 @@ class DB
$backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
foreach ($backtrace as $no => $call)
{
if (!preg_match('#/common/framework/(?:db|helpers)\b#', $call['file']) && $call['file'] !== \RX_BASEDIR . 'common/legacy.php')
if (!preg_match('#/common/framework/(?:DB|helpers)\b#', $call['file']) && $call['file'] !== \RX_BASEDIR . 'common/legacy.php')
{
$result['called_file'] = $backtrace[$no]['file'];
$result['called_line'] = $backtrace[$no]['line'];