From d0101fdc90434bf9f0a8f7f21fe44bdfaa7f9fc9 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 2 Jun 2022 18:57:52 +0200 Subject: [PATCH] errors is an array --- htdocs/emailcollector/class/emailcollector.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index e2493a338fd..0a8b17d56d4 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1911,7 +1911,7 @@ class EmailCollector extends CommonObject $sql = "SELECT rowid as id FROM " . MAIN_DB_PREFIX . "user WHERE email LIKE '%" . $from . "%'"; $resql = $this->db->query($sql); if ($resql->num_rows == 0) { - $this->errors = 'User Not allowed to add documents'; + $this->errors[] = 'User Not allowed to add documents'; } $arrayobject = array( 'propale' => array('table' => 'propal', @@ -2043,7 +2043,7 @@ class EmailCollector extends CommonObject $path = ($objectmanaged->entity > 1 ? "/" . $objectmanaged->entity : ''); $dirs[] = DOL_DATA_ROOT . $path . "/" . $elementpath . '/' . dol_sanitizeFileName($objectmanaged->ref) . '/'; } else { - $this->errors = 'object not found'; + $this->errors[] = 'object not found'; } } } @@ -2053,12 +2053,12 @@ class EmailCollector extends CommonObject $resr = saveAttachment($target, $prefix . '_' . $filename, $content); if ($resr == -1) { - $this->errors = 'Doc not saved'; + $this->errors[] = 'Doc not saved'; } } } } else { - $this->errors = 'no joined piece'; + $this->errors[] = 'no joined piece'; } } elseif ($operation['type'] == 'project') { // Create project / lead