[wp-trac] [WordPress Trac] #35597: Redefining already defined constructor for class WP_User_Search

WordPress Trac noreply at wordpress.org
Wed Jan 27 03:16:06 UTC 2016


#35597: Redefining already defined constructor for class WP_User_Search
--------------------------+-----------------------------
 Reporter:  arena         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Users         |     Version:  trunk
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:  administration
--------------------------+-----------------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 Yes, using both is not an issue, and is required for backwards
 compatibility with others who extend the classes, for example:
 {{{
 class DD32_WP_User_Search extends WP_User_Search {
    function __construct() {
       WP_User_Search::WP_User_Search(); // call parent constructor
       $this->customize_the_class();
    }
 }
 }}}

 It was removed from some older classes such as `wpdb` but we won't be
 removing it from classes in the future.

 Update to a more modern PHP version and you'll no longer see that message
 (alternatively, tweak the error reporting not to show `E_STRICT`'s).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35597#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list