WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #31679, comment 3


Ignore:
Timestamp:
03/18/2015 01:23:40 PM (6 years ago)
Author:
fulippo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31679, comment 3

    v1 v2  
    1 As regards the problem reported above, I think that just changing the code around line 1694 from
    2 
    3 {{{
    4 $tablefields = $wpdb->get_results("DESCRIBE {$table};")
    5 }}}
    6 
    7 to
    8 
    9 {{{
    10 $tablefields = array_map(function($row){
    11                    
    12     if( strpos( $row->Field, '`' ) === false ) {
    13         $row->Field = '`'.$row->Field.'`';
    14     }
    15                    
    16     return $row;
    17                    
    18 }, (array)$wpdb->get_results("DESCRIBE {$table};"));
    19 }}}
    20 
    21 Could solve the problem. Or, even better, changing line 1764 from
     1As regards the problem reported above, I think that just changing the code around line 1764 from
    222
    233{{{
     
    3111}}}
    3212
    33 would prevent from changing $cfields keys
     13would make all work correctly