Upgrade to 7.14.3 Email Addresses missing from compose

I just upgraded to 7.14.3 hoping it would solve another issue I’m working on, and after an R&R, I no longer have any email addresses in my email compose dropdown. I checked my outbound email accounts and they are working and they are linked to a working inbound account.

I’m getting the following error, which is puzzling, because the “$haystack” it is referring to is not even in that file.

This is showing up as a 500 error in console:

…/index.php?module=Emails&action=getFromFields

On further investigation, I’m getting an error in the PHP log:

[28-Feb-2024 18:50:43 UTC] PHP Fatal error:  Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in xxxxxxxxxxxxx/modules/Emails/EmailsDataAddressCollector.php:151
Stack trace:
#0 xxxxxxxxxxxxxxxxxxx/modules/Emails/EmailsDataAddressCollector.php(151): in_array('3ed2df85-d434-a...', false)
#1  xxxxxxxxxxxxxxxxx/modules/Emails/EmailsControllerActionGetFromFields.php(97): EmailsDataAddressCollector->collectDataAddressesFromIEAccounts(Array, false, NULL, NULL, Array)
#2  xxxxxxxxxxxxxxxxxx/modules/Emails/EmailsController.php(475): EmailsControllerActionGetFromFields->handleActionGetFromFields(Object(Email), Object(InboundEmail))
#3  xxxxxxxxxxxxxxxxxxxxxxxxxx/include/MVC/Controller/SugarController.php(522): EmailsController->action_getFromFields()
#4 xxxxxxxxxxxxxx/include/MVC/Controller/SugarController.php(491): SugarController->do_action()
#5 xxxxxxxxxxxxxxxxxxxxx/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()
#6 xxxxxxxxxxxxxxxxx/include/MVC/Controller/SugarController.php(361): SugarController->process()
#7 xxxxxxxxxxxxxxxxx/include/MVC/SugarApplication.php(101): SugarController->execute()
#8 xxxxxxxxxxxxxxxxxxxx/index.php(52): SugarApplication->execute()
#9 {main}
  thrown in xxxxxxxxxxxxxxx/modules/Emails/EmailsDataAddressCollector.php on line 151

Ok just got to the bottom of this one as well.

In my previous troubleshooting, I reset my user preferences, which deselected my subscribed email folders in my preferences. Re-subscribing to them solves the issue.

Learned something new, thought the subscription only pertained to inbound email!

It should probably end better than a 500 error when no email accounts are subscribed to in the user account and maybe return a message instead of “no accounts”

Nice work once again.

Can you add a better error message? We should really make email better, one small step at a time, until it’s usable (without an IDE and a debugger…)