[wp-trac] [WordPress Trac] #59836: Using the pre_get_table_charset filter ensures wpdb->col_meta never gets populated

WordPress Trac noreply at wordpress.org
Wed Nov 8 14:08:03 UTC 2023


#59836: Using the pre_get_table_charset filter ensures wpdb->col_meta never gets
populated
--------------------------+------------------------------
 Reporter:  c0ntax        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  6.3.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by c0ntax):

 The following in get_col_length() also seems to make the same assumption
 that running get_table_charset() will ensure that col_meta is populated:

 {{{#!php
                 if ( empty( $this->col_meta[ $tablekey ] ) ) {
                         // This primes column information for us.
                         $table_charset = $this->get_table_charset( $table
 );
                         if ( is_wp_error( $table_charset ) ) {
                                 return $table_charset;
                         }
                 }

                 if ( empty( $this->col_meta[ $tablekey ][ $columnkey ] ) )
 {
                         return false;
                 }
 }}}

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


More information about the wp-trac mailing list