Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jonhattanSo 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.
Comment #2
jonhattanJust 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`.
Comment #3
jonhattanwebchick: It could alternatively be fixed by this one: #562164: Check for the command being run in provision_mysql_drush_init() and provision_apache_drush_init()
Comment #4
jonhattanpatch in #562164 has been commited. So I'll move this to provision project and mark as fixed.
Comment #5
webchickOMG! 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. :)