// Add exceptions in db classes + normalize some files + split defines.inc file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9216 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-11 10:04:23 +00:00
parent 4d93b9a5fe
commit 4d91a31031
10 changed files with 86 additions and 57 deletions
+3 -3
View File
@@ -36,14 +36,14 @@ class MySQLCore extends Db
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
if (!$this->link = mysql_connect($this->server, $this->user, $this->password))
die(Tools::displayError('Link to database cannot be established.'));
throw new PrestashopDatabaseException(Tools::displayError('Link to database cannot be established.'));
if (!$this->set_db($this->database))
die(Tools::displayError('The database selection cannot be made.'));
throw new PrestashopDatabaseException(Tools::displayError('The database selection cannot be made.'));
// UTF-8 support
if (!mysql_query('SET NAMES \'utf8\'', $this->link))
die(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
throw new PrestashopDatabaseException(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
return $this->link;
}