Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-countable error when importing CSV #10285

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

pgorod
Copy link
Contributor

@pgorod pgorod commented Dec 18, 2023

Description

Not my issue, see this forum thread for details:
https://community.suitecrm.com/t/php-fatal-error-uncaught-typeerror-count-argument-1-value-must-be-of-type-countable-after-upgrade-to-suite-7-14/91224

[Thu Dec 14 19:43:01.002817 2023] [php:error] [pid 35371] [client 127.0.0.1:45634] 
PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in modules/Import/views/ImportListView.php:131

Stack trace:
#0 modules/Import/views/view.last.php(189): ImportListView->display()
#1 modules/Import/views/view.last.php(141): ImportViewLast->getListViewTableFromFile()
#2 include/MVC/View/SugarView.php(210): ImportViewLast->display()
#3 include/MVC/Controller/SugarController.php(432): SugarView->process()
#4 include/MVC/Controller/SugarController.php(363): SugarController->processView()
#5 include/MVC/SugarApplication.php(101): SugarController->execute()
#6 index.php(52): SugarApplication->execute()
#7 {main} thrown in modules/Import/views/ImportListView.php on line 131, referer: index.php

Problem only happens with PHP v8, not with v7.4.

How To Test This

Import CSV?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@SuiteBot
Copy link

This pull request has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/php-fatal-error-uncaught-typeerror-count-argument-1-value-must-be-of-type-countable-after-upgrade-to-suite-7-14/91224/9

@serhiisamko091184
Copy link
Contributor

Hi @pgorod,

Thanks for your PR!

Regards,
Serhii

@serhiisamko091184 serhiisamko091184 added Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Branch:Hotfix Area:Import Issues & PRs related to all things regarding Importing Status: Requires Code Review Needs the core team to code review PR 4-8 Score given to PRs once assessed labels Dec 22, 2023
@clemente-raposo clemente-raposo added Status: Requires Testing Requires Manual Testing Status: Passed Code Review Mark issue has passed code review reviewed and removed Status: Requires Code Review Needs the core team to code review labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Import Issues & PRs related to all things regarding Importing Branch:Hotfix PR 4-8 Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Status: Passed Code Review Mark issue has passed code review reviewed Status: Requires Testing Requires Manual Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants