Make WordPress Core

Ticket #26788: dbdelta.diff

File dbdelta.diff, 734 bytes (added by pollett, 11 years ago)

dbDelta allow multiple spaces

  • wp-admin/includes/upgrade.php

     
    16191619                        // If the table field exists in the field array...
    16201620                        if (array_key_exists(strtolower($tablefield->Field), $cfields)) {
    16211621                                // Get the field type from the query
    1622                                 preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches);
     1622                                preg_match("|".$tablefield->Field."\s+([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches);
    16231623                                $fieldtype = $matches[1];
    16241624
    16251625                                // Is actual field type different from the field type in query?