Make WordPress Core

Changeset 24065


Ignore:
Timestamp:
04/22/2013 10:00:50 PM (12 years ago)
Author:
nacin
Message:

dbDelta: When parsing out the DEFAULT value, avoid being too greedy. props hbanken, fixes #15948.

File:
1 edited

Legend:

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

    r23949 r24065  
    15671567                // Get the default value from the array
    15681568                    //echo "{$cfields[strtolower($tablefield->Field)]}<br>";
    1569                 if (preg_match("| DEFAULT '(.*)'|i", $cfields[strtolower($tablefield->Field)], $matches)) {
     1569                if (preg_match("| DEFAULT '(.*?)'|i", $cfields[strtolower($tablefield->Field)], $matches)) {
    15701570                    $default_value = $matches[1];
    15711571                    if ($tablefield->Default != $default_value) {
Note: See TracChangeset for help on using the changeset viewer.