PHP8.1/PHP8.2 - Email Listview doesn't render, so no Emails are visible. #5005

Open
opened 2026-02-20 16:27:44 -05:00 by deekerman · 0 comments
Owner

Originally created by @johnM2401 on GitHub (Apr 24, 2023).

Issue

When viewing the Email module in PHP8.1 or PHP8.2, it appears as though it has trouble rendering the Listview when a "Basic Auth" account is selected.

See, in PHP8.0:
image

However, in PHP 8.1/8.2 it displays as such:
image

With the error:

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/7133/cache/smarty/templates_c/%%AF^AF1^AF13FE7B%%ListViewGeneric.tpl.php:45 Stack trace: #0 /var/www/7133/vendor/smarty/smarty/libs/Smarty.class.php(1269): include() #1 /var/www/7133/include/Sugar_Smarty.php(151): Smarty->fetch() #2 /var/www/7133/include/ListView/ListViewSmarty.php(331): Sugar_Smarty->fetch() #3 /var/www/7133/include/MVC/View/views/view.list.php(285): ListViewSmarty->display() #4 /var/www/7133/include/MVC/View/views/view.list.php(391): ViewList->listViewProcess() #5 /var/www/7133/include/MVC/View/SugarView.php(210): ViewList->display() #6 /var/www/7133/include/MVC/Controller/SugarController.php(432): SugarView->process() #7 /var/www/7133/include/MVC/Controller/SugarController.php(363): SugarController->processView() #8 /var/www/7133/include/MVC/SugarApplication.php(101): SugarController->execute() #9 /var/www/7133/index.php(56): SugarApplication->execute() #10 {main} thrown in /var/www/7133/cache/smarty/templates_c/%%AF^AF1^AF13FE7B%%ListViewGeneric.tpl.php on line 45

However, the Listview appears to render correctly when using an Oauth'd Email Account.

Expected Behavior

Users should be able to view Emails in PHP 8.1/8.2

Actual Behavior

Listview does not render any items, and spits out a Fatal Error

Steps to Reproduce

  1. Create a Valid Inbound Email Account
  2. Navigate to the Email Listview, in PHP8.0
  3. See that the view loads
  4. Switch to PHP8.1 and see that the view no longer loads any email items.

Your Environment

  • SuiteCRM Version used: 7.13.3
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 112.0.1
  • Environment name and version (e.g. MySQL, PHP 7): PHP8.1/Mariadb 10.4 (Also fails in PHP8.2)
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 18.04
Originally created by @johnM2401 on GitHub (Apr 24, 2023). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> <!--- Please be aware that as of the 31st January 2022 we no longer support 7.10.x. New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above. If your issue is still applicable in 7.12.x, please create the issue following the template below --> #### Issue When viewing the Email module in PHP8.1 or PHP8.2, it appears as though it has trouble rendering the Listview when a "Basic Auth" account is selected. See, in PHP8.0: ![image](https://user-images.githubusercontent.com/13675281/233988108-ff6e07e9-53fb-4481-b40c-15e4c5b4b465.png) However, in PHP 8.1/8.2 it displays as such: ![image](https://user-images.githubusercontent.com/13675281/233988211-71ef4a24-8a61-4240-8f96-314eb8a1e706.png) With the error: ``` Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/7133/cache/smarty/templates_c/%%AF^AF1^AF13FE7B%%ListViewGeneric.tpl.php:45 Stack trace: #0 /var/www/7133/vendor/smarty/smarty/libs/Smarty.class.php(1269): include() #1 /var/www/7133/include/Sugar_Smarty.php(151): Smarty->fetch() #2 /var/www/7133/include/ListView/ListViewSmarty.php(331): Sugar_Smarty->fetch() #3 /var/www/7133/include/MVC/View/views/view.list.php(285): ListViewSmarty->display() #4 /var/www/7133/include/MVC/View/views/view.list.php(391): ViewList->listViewProcess() #5 /var/www/7133/include/MVC/View/SugarView.php(210): ViewList->display() #6 /var/www/7133/include/MVC/Controller/SugarController.php(432): SugarView->process() #7 /var/www/7133/include/MVC/Controller/SugarController.php(363): SugarController->processView() #8 /var/www/7133/include/MVC/SugarApplication.php(101): SugarController->execute() #9 /var/www/7133/index.php(56): SugarApplication->execute() #10 {main} thrown in /var/www/7133/cache/smarty/templates_c/%%AF^AF1^AF13FE7B%%ListViewGeneric.tpl.php on line 45 ``` However, the Listview appears to render correctly when using an Oauth'd Email Account. #### Expected Behavior Users should be able to view Emails in PHP 8.1/8.2 #### Actual Behavior Listview does not render any items, and spits out a Fatal Error #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Create a Valid Inbound Email Account 2. Navigate to the Email Listview, in PHP8.0 3. See that the view loads 4. Switch to PHP8.1 and see that the view no longer loads any email items. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.13.3 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 112.0.1 * Environment name and version (e.g. MySQL, PHP 7): PHP8.1/Mariadb 10.4 (Also fails in PHP8.2) * Operating System and version (e.g Ubuntu 16.04): Ubuntu 18.04
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5005
No description provided.