Warning: parse_url()
Cousimo - November 27, 2007 - 23:56
| Project: | backup |
| Version: | 5.x-4.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
* warning: parse_url() expects parameter 1 to be string, array given in /var/www/vhosts/jeconline.org/httpdocs/jec/sites/all/modules/backup/functions.inc.php on line 25.
* backup_files(): Command 'tar cfz /tmp/backup-htdocs-iR6Vkk drupal-5.3.tar.gz old.tar.gz jec index.php themes update.php bin xmlrpc.php files modules fantastico_fileslist.txt INSTALL.mysql.txt INSTALL.txt forums install.php scripts misc .htaccess robots.txt cron.php ssp UPGRADE.txt fantversion.php INSTALL.pgsql.txt ssp.swf LICENSE.txt info.php sites includes profiles cgi-bin MAINTAINERS.txt error_log CHANGELOG.txt olddb.sql dual_event drupal-backup-db-20071127183020-377309327.sql.gz ' returned value: 2

#1
#2
This module fails when multiple databases are used. The code in functions.inc.php needs to look something like this
global $db_url;
if (is_array($db_url)) {
$db_data = parse_url($db_url['default']);
}
else {
$db_data = parse_url($db_url);
}
#3
Is this going to be a patch?
I am a bit shy of placing this code into the php file, I know I will get it wrong.
Has any one done so?
Can they show the results here please?
That way i wont break the module like I usually do.
Thanks