BUG 6700 is solved, the installer don't crash any more

A validation before use mysql_error() was added and the error mesage was improbled
This commit is contained in:
Erik Amaru Ortiz
2011-04-08 18:54:13 -04:00
parent 6b7d1fa759
commit 8617323cfa

View File

@@ -443,7 +443,9 @@ class Installer
public function check_db($dbName)
{
if(!$this->connection_database) {
return Array('status' => false, 'message' => mysql_error());
//erik: new verification if the mysql extension is enabled
$error = class_exists('mysql_error') ? mysql_error() : 'Mysql Module for PHP is not enabled!';
return Array('status' => false, 'message' => $error);
}
else {
if(!mysql_select_db($dbName,$this->connection_database) && $this->cc_status!=1) {
@@ -482,7 +484,7 @@ class Installer
'connection' => false,
'grant' => 0,
'version' => false,
'message' => "php-mysql is Not Installed",
'message' => "ERROR: Mysql Module for PHP is not enabled, try install <b>php-mysql</b> package.",
'ao'=>Array(
'ao_db_wf' => false,
'ao_db_rb' => false,