Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.47k stars 2.8k forks source link

Error in mailing module #31766

Open hasse-basse opened 4 days ago

hasse-basse commented 4 days ago

Bug

When sending a mass mailing, the following error appears for each email sent. Despite this, the emails are delivered successfully, and I haven’t found any consequences, except that the log fills up."

PHP Warning: Invalid argument supplied for foreach() in /home/XXX/public_html/azert/htdocs/includes/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php on line 312 PHP Warning: preg_split() expects parameter 2 to be string, array given in /home/XXX/public_html/azert/htdocs/includes/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php on line 312

Dolibarr Version

19.0.3

Environment PHP

7.4

Environment Database

Maria

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

marc-dll commented 12 hours ago

Hello,

Can you please test with the lastest version including the FIX done in PR #31826 ?

Greetings

hasse-basse commented 12 hours ago

I works just fine. Great job, thanks. Now I can run on PHP8.2!

hasse-basse commented 10 hours ago

I'm not sure what I answered. I had 2 issues and it seem like there has been a c confusion by either of us. What work fine for me is

Emailing module throws error in PHP8.2 but not in PHP7.4 #31741

I changed the this code

FIX: swiftmailer: correctly set errors-to header #31826

with the result that

Emailing module throws error in PHP8.2 but not in PHP7.4 #31741

started to work

marc-dll commented 7 hours ago

Sorry for being pointy, so you still have the problem reported on the first post of this issue ?

PHP Warning: Invalid argument supplied for foreach() in /home/XXX/public_html/azert/htdocs/includes/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php on line 312
PHP Warning: preg_split() expects parameter 2 to be string, array given in /home/XXX/public_html/azert/htdocs/includes/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php on line 312