[wp-trac] [WordPress Trac] #53978: Non-static method 'get_default_primary_column_name' should not be called statically

WordPress Trac noreply at wordpress.org
Thu Feb 10 13:56:04 UTC 2022

#53978: Non-static method 'get_default_primary_column_name' should not be called
 Reporter:                 |       Owner:  (none)
  volodymyrkolesnykov      |
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:
Component:                 |     Version:  4.3
  Administration           |
 Severity:  normal         |  Resolution:
 Keywords:  dev-feedback   |     Focuses:  administration, coding-standards
Changes (by azouamauriac):

 * keywords:   => dev-feedback
 * status:  closed => reopened
 * focuses:  administration => administration, coding-standards
 * resolution:  invalid =>


 Replying to [comment:3 SergeyBiryukov]:
 > Hi there, welcome back to WordPress Trac! Thanks for the report.
 > This was introduced in [33266] / #32996 for WordPress 4.3, and further
 adjusted in [49192]. Changing the Version field accordingly.
 > Could you provide the steps to reproduce the issue on a clean install?
 That would be helpful to move the ticket forward.

 Hello, it's not an issue properly say, it's a coding
 standard[https://prnt.sc/26sw7eq], since the method
 get_default_primary_column_name is not static; I believe, it's a wrong
 practice to use it as it was static; and it may be create some confusions.

 I think the good practice would be to call parent
 method(get_default_primary_column_name) from subclass instead to call it

Ticket URL: <https://core.trac.wordpress.org/ticket/53978#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list