Latest HEAD from 4 seconds ago.

I have a $db_url['default'] and a $db_url['external'] in settings.php. When I try drush enable fivestar, I get:

warning: parse_url() expects parameter 1 to be string, array given in /Users/webchick/.drush/provision/db_server/provision_mysql.drush.inc on line 15.

It still seems to work fine anyway though.

Comments

jonhattan’s picture

So line 15 is part of drush_hook_init of provision's mysql commands file. This is a 50% drush 50% provision issue :)

It is drush as far as drush calls all drush_hook_init's whatever is the command you're executing. I've proposed to not do so at #551572: Only invoke drush_init and drush_exit hooks of the commandfile the command to run is defined in.

It is provision as far as the drush_hook_init() could avoid initializations if the command being executed is not a provision one, as it does in provision_drupal_drush_init.

In addition it is also a fault for provision to consider $db_url as a string and not an array for the import tasks. Other tasks can be ok with that assumption as settings.php is created and managed by aegir itself.

So several possible solutions out there.

jonhattan’s picture

Just checked that import tasks in provision do correctly check if db_url is an array or not. It's at `provision/platform/drupal/import_{5,6,7}.inc`.

jonhattan’s picture

jonhattan’s picture

Project: Drush » Provision
Status: Active » Fixed

patch in #562164 has been commited. So I'll move this to provision project and mark as fixed.

webchick’s picture

OMG! Next time I will *read the error message* before filing bugs. :P~ Terribly sorry. I totally forgot I had played around with Aegir on this machine at some point.

And, wow! Thanks so much for the speedy attention to this! :) I cvs upped and the error magically vanishes. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.