| @@ 30-39 (lines=10) @@ | ||
| 27 | * |
|
| 28 | * @return Xoops |
|
| 29 | */ |
|
| 30 | function xoops_functions_php_deprecated($function, $file, $line) |
|
| 31 | { |
|
| 32 | $xoops = \Xoops::getInstance(); |
|
| 33 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); |
|
| 34 | $xoops->deprecated( |
|
| 35 | "{$function} is deprecated. Called from {$trace[1]['file']} line {$trace[1]['line']}." |
|
| 36 | . " See how to replace it in file {$file} line {$line}" |
|
| 37 | ); |
|
| 38 | return $xoops; |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Replace function "deprecation" warning with trace - consider private |
|
| @@ 49-58 (lines=10) @@ | ||
| 46 | * |
|
| 47 | * @return Xoops |
|
| 48 | */ |
|
| 49 | function xoops_functions_php_replaced_by_mod($function, $module) |
|
| 50 | { |
|
| 51 | $xoops = \Xoops::getInstance(); |
|
| 52 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); |
|
| 53 | $xoops->deprecated( |
|
| 54 | "{$function} is deprecated. Called from {$trace[1]['file']} line {$trace[1]['line']}." |
|
| 55 | . " Convert to use {$module}." |
|
| 56 | ); |
|
| 57 | return $xoops; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @deprecated |
|
| @@ 482-491 (lines=10) @@ | ||
| 479 | trigger_error("Smarty error: $error_msg", $error_type); |
|
| 480 | } |
|
| 481 | ||
| 482 | protected function deprecated($function, $file, $line) |
|
| 483 | { |
|
| 484 | $xoops = \Xoops::getInstance(); |
|
| 485 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); |
|
| 486 | $xoops->deprecated( |
|
| 487 | "{$function} is deprecated. Called from {$trace[1]['file']} line {$trace[1]['line']}." |
|
| 488 | . " See how to replace it in file {$file} line {$line}" |
|
| 489 | ); |
|
| 490 | return $xoops; |
|
| 491 | } |
|
| 492 | } |
|
| 493 | ||