[wp-trac] [WordPress Trac] #33440: Deprecated PHP4 style constructor warnings make debugging hard
WordPress Trac
noreply at wordpress.org
Wed Aug 19 17:42:05 UTC 2015
#33440: Deprecated PHP4 style constructor warnings make debugging hard
-------------------------+-----------------------------
Reporter: McGuive7 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 4.3
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
At present, the PHP 4 style constructor deprecation warning messages read
as follows for widgets:
`The called constructor method for WP_Widget is deprecated`
This indicates that a widget is causing the issue, however gives no
indication as to which widget is using the PHP4 style constructor. What
might be more helpful is indicate the specific widget that is throwing the
notice, like so:
`The called constructor method for {Widget class that is extending
WP_Widget} is deprecated`
This can be easily accomplished by subbing out the static text used in the
`_deprecated_constructor()` call (currently "WP_Widget"), for the actual
name of the widget class that is extending WP_Widget.
A quick search for `_deprecated_constructor` across all files reveals that
it is only used in one other instance, in the `WP_Widget_Factory` class.
This class is likely far less extended, however it can't hurt to make the
same change here as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33440>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list