[wp-trac] [WordPress Trac] #35849: Details in _deprecated_function

WordPress Trac noreply at wordpress.org
Wed Feb 17 07:22:25 UTC 2016


#35849: Details in _deprecated_function
------------------------------+-----------------------------
 Reporter:  sebastian.pisula  |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 I think that notice is not enough detail:

 {{{
 [17-Feb-2016 07:10:18 UTC] PHP Notice:  is_comments_popup is
 <strong>deprecated</strong> since version 4.5 with no alternative
 available. in \wp-includes\functions.php on line 3610
 }}}

 I don't know where is source or error.

 Meybe:

 {{{#!php
 <?php
 debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
 }}}

 will be good idea ?

 I have more details where is call function:


 {{{
 Array
 (
     [0] => Array
         (
             [file] => wp-includes\deprecated.php
             [line] => 3690
             [function] => _deprecated_function
         )

     [1] => Array
         (
             [function] => is_comments_popup
         )

     [2] => Array
         (
             [file] => wp-content\plugins\query-
 monitor\collectors\conditionals.php
             [line] => 81
             [function] => call_user_func
         )

     [3] => Array
         (
             [file] => wp-content\plugins\query-
 monitor\classes\Collectors.php
             [line] => 57
             [function] => process
             [class] => QM_Collector_Conditionals
             [type] => ->
         )

     [4] => Array
         (
             [file] => wp-content\plugins\query-
 monitor\classes\Dispatcher.php
             [line] => 56
             [function] => process
             [class] => QM_Collectors
             [type] => ->
         )

     [5] => Array
         (
             [file] => wp-content\plugins\query-
 monitor\dispatchers\Html.php
             [line] => 184
             [function] => get_outputters
             [class] => QM_Dispatcher
             [type] => ->
         )

     [6] => Array
         (
             [function] => dispatch
             [class] => QM_Dispatcher_Html
             [type] => ->
         )

     [7] => Array
         (
             [file] => wp-includes\plugin.php
             [line] => 525
             [function] => call_user_func_array
         )

     [8] => Array
         (
             [file] => wp-includes\load.php
             [line] => 637
             [function] => do_action
         )

     [9] => Array
         (
             [function] => shutdown_action_hook
         )

 )
 }}}

 Alternative for debug_backtrace() is this script:

 {{{#!php
 <?php
 $e = new Exception;
 $e->getTraceAsString()
 }}}

 In output I can see:


 {{{
 #0 wp-includes\deprecated.php(3690):
 _deprecated_function('is_comments_pop...', '4.5')
 #1 [internal function]: is_comments_popup()
 #2 wp-content\plugins\query-monitor\collectors\conditionals.php(81):
 call_user_func('is_comments_pop...')
 #3 wp-content\plugins\query-monitor\classes\Collectors.php(57):
 QM_Collector_Conditionals->process()
 #4 wp-content\plugins\query-monitor\classes\Dispatcher.php(56):
 QM_Collectors->process()
 #5 wp-content\plugins\query-monitor\dispatchers\Html.php(184):
 QM_Dispatcher->get_outputters('html')
 #6 [internal function]: QM_Dispatcher_Html->dispatch('')
 #7 wp-includes\plugin.php(525): call_user_func_array(Array, Array)
 #8 wp-includes\load.php(637): do_action('shutdown')
 #9 [internal function]: shutdown_action_hook()
 #10 {main}
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35849>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list