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
Avoid count()
ing NULL
#180
Conversation
@jensschuppe #180 is absolutely fine for me, and it's pretty clear that you know your codebase much better than I do! When will release 2.3 be published? |
68afb45
to
aede56d
Compare
aede56d
to
f0f79d3
Compare
@bjendres a quick review? And any concerns releasing this as a |
I have tested #180 and it works well. And, releasing as 2.2.1 would be perfect! |
Released with version |
CRM_Utils_System::url( | ||
'civicrm/donrec/task', | ||
'sid=' . $result['snapshot']->getId() | ||
. '&ccount=' . count($this - $this->getContactIDs()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jensschuppe I think this calculation is not intended and will cause a type error in PHP 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting that, I released 2.2.3 with that being fixed.
Fixes #178 by not trying to
count()
potentially not initialized$this->_contactIds
in task forms and use$this->getContactIDs()
instead which has a null-coalesce guard with a default value of[]
.