WordPress.org

Make WordPress Core

Ticket #5047: dbDelta.diff

File dbDelta.diff, 545 bytes (added by arnee, 7 years ago)

if(is_array($indices)) Diff

  • upgrade.php

     
    10121012                                } 
    10131013 
    10141014                                // For every remaining index specified for the table 
    1015                                 foreach($indices as $index) { 
     1015                                if(is_array($indices)) foreach($indices as $index) { 
    10161016                                        // Push a query line into $cqueries that adds the index to that table 
    10171017                                        $cqueries[] = "ALTER TABLE {$table} ADD $index"; 
    10181018                                        $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index;