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

dev/core#406 fix warnings under php 7.2 when importing #13133

Merged
merged 1 commit into from
Nov 24, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Nov 20, 2018

Overview

Fixes import warnings under php 7.2 on import

Before

2018/09/25 18:15:04 [error] 33#33: *451 FastCGI sent in stderr: "PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 375
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 387
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 396
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 408
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 417
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 426
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 435
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 444
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 455
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 464
PHP message: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/share/civicrm/CRM/Contact/Import/Parser.php on line 476" while reading response header from upstream, client: 192.168.0.2, server: civicrm.local, request: "POST /wp-admin/admin.php?page=CiviCRM&q=civicrm/impor

After

No red messages

Technical Details

php 7.2 won't accept counting NULL. I have chosen to set the variables to empty arrays instead of NULL - which seems to work fine

Comments

https://lab.civicrm.org/dev/core/issues/406

@civibot
Copy link

civibot bot commented Nov 20, 2018

(Standard links)

@civibot civibot bot added the master label Nov 20, 2018
@seamuslee001
Copy link
Contributor

Jenkins re test this please

@monishdeb
Copy link
Member

Confirmed it fixes those warnings in my php 7.2 local instance. Merging now.

@monishdeb monishdeb merged commit 1865ac5 into civicrm:master Nov 24, 2018
@eileenmcnaughton eileenmcnaughton deleted the php72import branch November 24, 2018 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants