From bf4fca0c7e9ff9c4cc6962598fc0e45f0d42e3ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Feb 2020 22:09:21 +0100 Subject: [PATCH 1/4] Fix warning --- htdocs/core/tpl/extrafields_list_search_sql.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index bdaf963b4f5..59b73b4c861 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -10,7 +10,7 @@ if (empty($conf) || ! is_object($conf)) if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element; // Loop to complete the sql search criterias from extrafields -if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... +if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... { foreach ($search_array_options as $key => $val) { From 857c22cb29e6685c885290839df746924d9ca3c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Feb 2020 10:13:10 +0100 Subject: [PATCH 2/4] Fix doc --- htdocs/core/db/DoliDB.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 29d77c089c0..8ca84e0dd10 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/db/Database.interface.php'; */ abstract class DoliDB implements Database { - /** @var bool|resource Database handler */ + /** @var bool|resource|SQLite3 Database handler */ public $db; /** @var string Database type */ public $type; From 13442ef0df9384784e606a7376f895cf27ced37f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Feb 2020 13:01:09 +0100 Subject: [PATCH 3/4] FIX Filenames must not contains non ascii char or we will get non ascii char into the SMTP header. --- htdocs/core/class/CMailFile.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index e0a1fd35092..2318cb90e19 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -137,6 +137,13 @@ class CMailFile { global $conf, $dolibarr_main_data_root; + // Clean values of $mimefilename_list + if (is_array($mimefilename_list)) { + foreach($mimefilename_list as $key => $val) { + $mimefilename_list[$key] = dol_string_unaccent($mimefilename_list[$key]); + } + } + $this->subject = $subject; $this->addr_to = $to; $this->addr_from = $from; From e14612f569431bd10c85bf078c0ee3412fe66ff6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Feb 2020 13:01:09 +0100 Subject: [PATCH 4/4] FIX Filenames must not contains non ascii char or we will get non ascii char into the SMTP header. Conflicts: htdocs/core/class/CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 402b19701d7..809cf15edbf 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -124,6 +124,13 @@ class CMailFile { global $conf, $dolibarr_main_data_root; + // Clean values of $mimefilename_list + if (is_array($mimefilename_list)) { + foreach($mimefilename_list as $key => $val) { + $mimefilename_list[$key] = dol_string_unaccent($mimefilename_list[$key]); + } + } + $this->sendcontext = $sendcontext; if (empty($replyto)) $replyto=$from;