Deprecating PHP4-style constructors gracefully
|Reported by:||uuf6429||Owned by:||SergeyBiryukov|
Description (last modified by SergeyBiryukov)
The class WP_Widget in wp-includes/widget.php makes use of PHP4-style constructor for compatibility with plugins (mostly).
I propose two changes here:
- A direct call to the old constructor should trigger a deprecation notice
- The PHP4-style constructor *must* be declared after __construct() otherwise, an E_STRICT regarding constructor re-declaration is thrown.
Please find a patch attached...
Change History (13)
- Milestone changed from Awaiting Review to 3.6
- Version changed from 3.3.2 to 3.2
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
Note: See TracTickets for help on using tickets.