diff --git a/classes/Translate.php b/classes/Translate.php index 3386b2192..970dd2b66 100644 --- a/classes/Translate.php +++ b/classes/Translate.php @@ -132,7 +132,7 @@ class TranslateCore $local_path = _PS_MODULE_DIR_.$name.'/'; - if (!isset($name) || !isset($translations_merged[$name])) + if (!isset($translations_merged[$name])) { // Check if translations exists in a current theme if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$name.'/translations/'.Context::getContext()->language->iso_code.'.php')) diff --git a/classes/db/MySQL.php b/classes/db/MySQL.php index e9082084c..65a72f95f 100644 --- a/classes/db/MySQL.php +++ b/classes/db/MySQL.php @@ -154,7 +154,7 @@ class MySQLCore extends Db /** * @see Db::checkConnection() */ - public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null) + public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5) { ini_set('mysql.connect_timeout', $timeout); if (!$link = @mysql_connect($server, $user, $pwd, $newDbLink))