Now without PHP errors.

This commit is contained in:
James Cole
2017-11-29 16:26:00 +01:00
parent dedf774bf2
commit 4dee6a9f59
2 changed files with 7 additions and 9 deletions

View File

@@ -28,13 +28,13 @@ $username = '';
$password = '';
$database = '';
+if (!($databaseUrl === false)) {
$options = parse_url($databaseUrl);
$host = $options['host'];
$username = $options['user'];
$password = $options['pass'];
$database = substr($options['path'], 1);
}
if (!($databaseUrl === false)) {
$options = parse_url($databaseUrl);
$host = $options['host'];
$username = $options['user'];
$password = $options['pass'];
$database = substr($options['path'], 1);
}
return [