Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
install system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2008 at 14:27 UTC
Updated:
11 Sep 2008 at 08:42 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
damien tournoud commentedNo panda shall remain sad.
Comment #2
webchickHa, thanks!
Works fine. I asked why this is longer than a one-line change, and Damien pointed out that not all installations may have MySQL, so we should only default to it if it exists. Touché.
current(array_keys($drivers)) would be a bit more clear as just key($drivers).
+ $database = isset($databases['default']['default']) ? $databases['default']['default'] : array(); is weird. $database['default']['default']? I realize this isn't specific to this patch, but why a nested array like that? Can we add some documentation to that line?
Comment #3
webchickComment #4
damien tournoud commentedNot really. key($drivers) is the key of the current position in $drivers. current(array_keys($drivers)) is the first key of $drivers. There is no real guarantee that both will be equal.
The syntax of the $databases array is described in settings.php:
Comment #5
webchickFair enough then. :)
Comment #6
dries commentedUnfortunately, this panda will have to wait for a re-roll. Patch no longer applies. The end() trick might be better than the current trick.
Comment #7
Anonymous (not verified) commentedi created a duplicate issue for this.
i've attached an updated patch, but it still doesn't quite match the doco. do we want to handle the case i described in the issue above (which this patch doesn't manage), or do we need to update the docs?
Comment #8
damien tournoud commentedThe patch in #7 is good to go, thanks justin.
Comment #9
dries commentedCommitted to CVS HEAD. Thanks!
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.