#13202 closed enhancement (wontfix)
deprecated function warning improvement
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Knee-deep in tests I ran over this:
Since PHP 4.3 we have a nice function called debug_backtrace()
that can improve the message thrown out in _deprecated_function()
a lot by adding information about the context (e.g. file and line) where a deprecated function was originally called.
In conjunction with WP_DEBUG a real time saver. Simple and smooth. Patch is against fresh trunk.
Example output after patch:
Notice: get_settings is deprecated since version 2.1! Use get_option() instead. Called in file wp-content/themes/oldtheme/functions.php on line 5.
Since we're globally in testing these days I can only suggest to give this a shot and put this ticket 3.0 out of the standard order. If a core dev is not confident with that, please put on a later version.
Attachments (1)
Change History (6)
#2
@
15 years ago
- Keywords dev-feedback removed
Well I dunno wether performance is a real issue here. I think about adding that functionality to an error reporter component then. Thanks for taking the look into it.
#3
@
15 years ago
There's a plugin for that!
http://striderweb.com/nerdaphernalia/features/wp-log-deprecated-calls/
Some people run WP_DEBUG on production servers. A plugin can easily hook in and do this, we won't be adding the performance hit into core though.