Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 9 years ago

#13202 closed enhancement (wontfix)

deprecated function warning improvement

Reported by: hakre's profile 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)

13202.patch (1.6 KB) - added by hakre 15 years ago.

Download all attachments as: .zip

Change History (6)

@hakre
15 years ago

#1 @nacin
15 years ago

  • Milestone 3.0 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

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.

#2 @hakre
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.

#4 @ocean90
9 years ago

#35849 was marked as a duplicate.

#5 @ocean90
9 years ago

#36565 was marked as a duplicate.

Note: See TracTickets for help on using tickets.