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

WordPress Trac noreply at wordpress.org
Wed Feb 9 23:22:06 UTC 2022


#55131: Non static method 'get_default_primary_column_name' should not be called
statically
--------------------------+-----------------------------
 Reporter:  azouamauriac  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Some histories : [33266] [49192]

 ----
 WP_List_Table::get_default_primary_column_name() is not a static method so
 it shouldn't be use as it.

 I suggest that we instantiate the class before using the method

 My proposal:
 {{{#!php
 <?php

  $list_table = new self();
  $default = $list_table->get_default_primary_column_name();
 }}}

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


More information about the wp-trac mailing list