From 7c6ceae4b5890842982c5de80e6e20d145c23454 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 19 Jan 2009 07:33:40 +0000 Subject: mysql_create_db() might not exist --- installer/installer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'installer/installer.php') diff --git a/installer/installer.php b/installer/installer.php index 9d890cb5..50ec97a2 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -132,7 +132,9 @@ class installer { return; } - if (!mysql_select_db($config["dbname"]) && !mysql_create_db($config["dbname"])) { + if (!mysql_select_db($config["dbname"]) && + !function_exists("mysql_create_db") || + !mysql_create_db($config["dbname"])) { $errors["Database"] = sprintf( "Database '%s' is not defined and can't be created", $config["dbname"]); -- cgit v1.2.3