From 976b5c26c76335e59dc1fb8ec8858a2a095b101d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 9 Apr 2018 12:26:39 +0200 Subject: [PATCH 1/2] Fix: TODO get_charset() function don't exists --- htdocs/install/upgrade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index fce91f7925d..6186cee02b3 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -183,7 +183,8 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 print ''.$langs->trans("ServerVersion").''; print ''.$version.''; dolibarr_install_syslog("upgrade: " . $langs->transnoentities("ServerVersion") . ": " .$version); - if ($db->type == 'mysqli') + // TODO get_charset() function don't exists + /*if ($db->type == 'mysqli') { $tmparray = $db->db->get_charset(); print ''.$langs->trans("ClientCharset").''; @@ -192,7 +193,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 print ''.$langs->trans("ClientSortingCharset").''; print ''.$tmparray->collation.''; dolibarr_install_syslog("upgrade: " . $langs->transnoentities("ClientCollation") . ": " .$tmparray->collation); - } + }*/ // Test database version requirement $versionmindb=explode('.',$db::VERSIONMIN); From 89ec185f514528c5461a1776b54410b02ce967c8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 9 Apr 2018 12:53:03 +0200 Subject: [PATCH 2/2] Fix: avoid Error: Call to undefined method mysqli::get_charset() --- htdocs/install/upgrade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 6186cee02b3..5132168c076 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -183,8 +183,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 print ''.$langs->trans("ServerVersion").''; print ''.$version.''; dolibarr_install_syslog("upgrade: " . $langs->transnoentities("ServerVersion") . ": " .$version); - // TODO get_charset() function don't exists - /*if ($db->type == 'mysqli') + if ($db->type == 'mysqli' && function_exists('mysqli_get_charset')) { $tmparray = $db->db->get_charset(); print ''.$langs->trans("ClientCharset").''; @@ -193,7 +192,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 print ''.$langs->trans("ClientSortingCharset").''; print ''.$tmparray->collation.''; dolibarr_install_syslog("upgrade: " . $langs->transnoentities("ClientCollation") . ": " .$tmparray->collation); - }*/ + } // Test database version requirement $versionmindb=explode('.',$db::VERSIONMIN);