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 to avoid passing non-money to money::format #19940

Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Mar 30, 2021

Overview

Fix to avoid passing non-money to money::format

Before

we are passing the concatentation of 2 money amounts to format money

After

Form does a bit more work

Technical Details

Comments

Response to @demeritcowboy trying to break our tests

@civibot
Copy link

civibot bot commented Mar 30, 2021

(Standard links)

@demeritcowboy
Copy link
Contributor

Thanks will take a look.

@demeritcowboy
Copy link
Contributor

The code looks ok just I'm having trouble doing an r-run since I'm not sure what the report wants and I keep getting no results. Also another INTL popup came up. Will pick this up again tomorrow, which for you is two days from now.

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy yeah I just stepped through this on tests - seems pretty safe to me - the one that affects the forms might deserve a bit more careful checking

@demeritcowboy
Copy link
Contributor

Ok I sort of figured out how to run, just still can't see how to have multiple comma separated values but anyway the warning is gone. Looks good.

Aside: when saving the contribution with a recognition date filled in you get

    Warning: array_filter() expects parameter 1 to be array, string given in CRM_Contribute_Form_Contribution::formRule() (line 914 of /home/jenkins/bknix-dfl/build/core-19940-91yka/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php).
    Warning: count(): Parameter must be an array or an object that implements Countable in CRM_Contribute_Form_Contribution::formRule() (line 914 of /home/jenkins/bknix-dfl/build/core-19940-91yka/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php).

@seamuslee001
Copy link
Contributor

I'm going to merge based on @demeritcowboy 's review @eileenmcnaughton I think the other 2 issues should probably be put into the lab

@seamuslee001 seamuslee001 merged commit ba66443 into civicrm:master Mar 30, 2021
@seamuslee001 seamuslee001 deleted the dave_shall_not_break_our_tests branch March 30, 2021 22:45
@demeritcowboy
Copy link
Contributor

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