Make WordPress Core

Ticket #29941: 29941.diff

File 29941.diff, 1.1 KB (added by extendwings, 10 years ago)
  • wp-admin/includes/upgrade.php

    diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
    index dda925e..ef87f77 100644
    a b function dbDelta( $queries = '', $execute = true ) { 
    16451645
    16461646        // Create a tablename index for an array ($cqueries) of queries
    16471647        foreach($queries as $qry) {
    1648                 if (preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) {
     1648                if (preg_match("|CREATE TABLE ([^ ]*)|i", $qry, $matches)) {
    16491649                        $cqueries[ trim( $matches[1], '`' ) ] = $qry;
    16501650                        $for_update[$matches[1]] = 'Created table '.$matches[1];
    1651                 } else if (preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) {
     1651                } else if (preg_match("|CREATE DATABASE ([^ ]*)|i", $qry, $matches)) {
    16521652                        array_unshift($cqueries, $qry);
    1653                 } else if (preg_match("|INSERT INTO ([^ ]*)|", $qry, $matches)) {
     1653                } else if (preg_match("|INSERT INTO ([^ ]*)|i", $qry, $matches)) {
    16541654                        $iqueries[] = $qry;
    1655                 } else if (preg_match("|UPDATE ([^ ]*)|", $qry, $matches)) {
     1655                } else if (preg_match("|UPDATE ([^ ]*)|i", $qry, $matches)) {
    16561656                        $iqueries[] = $qry;
    16571657                } else {
    16581658                        // Unrecognized query type