Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5047 closed defect (bug) (fixed)

dbDelta generates E_WARNING if no indices are defined

Reported by: arnee's profile arnee Owned by: arnee's profile arnee
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.3
Component: Optimization Keywords: has-patch
Focuses: Cc:

Description

dbDelta tries to loop through the array of indexes with foreach, but this array is NULL if no indexes are defined. Foreach with NULL => E_WARNING

Solution: Check if $indices is an array

Attachments (1)

dbDelta.diff (545 bytes) - added by arnee 17 years ago.
if(is_array($indices)) Diff

Download all attachments as: .zip

Change History (4)

@arnee
17 years ago

if(is_array($indices)) Diff

#1 @arnee
17 years ago

  • Keywords has-patch added
  • Status changed from new to assigned

#2 @foolswisdom
17 years ago

  • Milestone changed from 2.2.3 to 2.3

#3 @markjaquith
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6158]) Cast to array in upgrade foreach(). props arnee. fixes #5047

Note: See TracTickets for help on using tickets.