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#772 fix php7.2 warnings on import #262

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Aug 12, 2019

Overview

Fixed a notice when importing with php 7.2

This is replicable if you have an import file with the column 'Contact Source' among others & import setting it to
use 'Column Headers'. It correctly maps contact source & sets it as a default.

Before

Screen Shot 2019-08-12 at 12 00 15 PM

After

No notice

Technical Details

The code in setValue
is open to either a string or an array but it uses count() in it's initial check - which was OK back when it was written

  • nowadays count on a string puts out an error (but still returns 1) as per originally

This is replicable if you have an import file with the column 'Contact Source' among others & import setting it to
use 'Column Headers'. It correctly maps contact source & sets it as a default. The code in setValue
is open to either a string or an array but it uses count() in it's initial check - which was OK back when it was written
- nowadays count on a string puts out an error (but still returns 1) as per originally
@civibot civibot bot added the master label Aug 12, 2019
@civibot
Copy link

civibot bot commented Aug 12, 2019

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

test this please

@jitendrapurohit
Copy link
Contributor

I was able to replicate this and confirm that the patch fixes the error. The "before" notice screen looks like below on contribution import -

image

After - No error on import screen.

@eileenmcnaughton eileenmcnaughton merged commit 4b3211f into civicrm:master Aug 18, 2019
@eileenmcnaughton
Copy link
Contributor Author

thanks @jitendrapurohit

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.

2 participants