Resolve notice issue on book now page

This commit is contained in:
Abhishek Kumar
2022-03-28 19:01:09 +05:30
parent 4d11fc5dbb
commit 75fd8a007a
2 changed files with 5 additions and 3 deletions

View File

@@ -2643,10 +2643,12 @@ exit;
$backtrace = debug_backtrace();
$callee = next($backtrace);
$class = isset($callee['class']) ? $callee['class'] : null;
$callee['file'] = isset($callee['file']) ? $callee['file'] : '<undefined>';
$callee['line'] = isset($callee['line']) ? $callee['line'] : '<undefined>';
if ($message === null) {
$message = 'The function '.$callee['function'].' (Line '.$callee['line'].') is deprecated and will be removed in the next major version.';
}
$error = 'Function <b>'.$callee['function'].'()</b> is deprecated in <b>'.$callee['file'].'</b> on line <b>'.$callee['line'].'</b><br />';
$error = 'Function: '.$callee['function'].'() is deprecated in file: '.$callee['file'].' on line: '.$callee['line'].'<br />';
Tools::throwDeprecated($error, $message, $class);
}