WordPress.org

Make WordPress Core

Changeset 10948


Ignore:
Timestamp:
04/16/09 17:45:11 (5 years ago)
Author:
ryan
Message:

Handle backticks in dbDelta. Props AaronCampbell. fixes #8014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r10902 r10948  
    11861186    foreach($queries as $qry) { 
    11871187        if(preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) { 
    1188             $cqueries[strtolower($matches[1])] = $qry; 
     1188            $cqueries[trim( strtolower($matches[1]), '`' )] = $qry; 
    11891189            $for_update[$matches[1]] = 'Created table '.$matches[1]; 
    11901190        } 
     
    12251225                    // Extract the field name 
    12261226                    preg_match("|^([^ ]*)|", trim($fld), $fvals); 
    1227                     $fieldname = $fvals[1]; 
     1227                    $fieldname = trim( $fvals[1], '`' ); 
    12281228 
    12291229                    // Verify the found field name 
Note: See TracChangeset for help on using the changeset viewer.