Ticket #5047 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

dbDelta generates E_WARNING if no indices are defined

Reported by: arnee Assigned to: arnee
Priority: normal Milestone: 2.3
Component: Optimization Version: 2.3
Severity: normal Keywords: has-patch
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

dbDelta.diff (0.5 kB) - added by arnee on 09/22/07 11:31:59.
if(is_array($indices)) Diff

Change History

09/22/07 11:31:59 changed by arnee

  • attachment dbDelta.diff added.

if(is_array($indices)) Diff

09/22/07 11:32:47 changed by arnee

  • keywords set to has-patch.
  • status changed from new to assigned.

09/22/07 16:46:03 changed by foolswisdom

  • milestone changed from 2.2.3 to 2.3.

09/22/07 23:14:38 changed by markjaquith

  • status changed from assigned to closed.
  • resolution set to fixed.

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