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);
}

View File

@@ -93,8 +93,8 @@ smartyRegisterFunction($smarty, 'function', 'd', 'smartyDieObject'); // Debug on
smartyRegisterFunction($smarty, 'function', 'l', 'smartyTranslate', false);
smartyRegisterFunction($smarty, 'function', 'hook', 'smartyHook');
smartyRegisterFunction($smarty, 'function', 'toolsConvertPrice', 'toolsConvertPrice');
smartyRegisterFunction($smarty, 'modifier', 'json_encode', array('Tools', 'jsonEncode'));
smartyRegisterFunction($smarty, 'modifier', 'json_decode', array('Tools', 'jsonDecode'));
smartyRegisterFunction($smarty, 'modifier', 'json_encode', 'json_encode');
smartyRegisterFunction($smarty, 'modifier', 'json_decode', 'json_decode');
smartyRegisterFunction($smarty, 'function', 'dateFormat', array('Tools', 'dateFormat'));
smartyRegisterFunction($smarty, 'function', 'convertPrice', array('Product', 'convertPrice'));
smartyRegisterFunction($smarty, 'function', 'convertPriceWithCurrency', array('Product', 'convertPriceWithCurrency'));