Describe the bug
The use of count() on the returned object from find() in the User model throws a fatal error since the object does not implement Countable. Find will only return a single object or NULL, neither of which implement Countable. Not sure if this is because of other changes or an upgrade to later versions of PHP, but it used to work and I only noticed recently that it started failing.
I have made and tested a fix, and created a PR for it. There are probably other places where this is failing and I intend to make more PRs later as I encounter them.
Describe the bug The use of count() on the returned object from find() in the User model throws a fatal error since the object does not implement Countable. Find will only return a single object or NULL, neither of which implement Countable. Not sure if this is because of other changes or an upgrade to later versions of PHP, but it used to work and I only noticed recently that it started failing.
I have made and tested a fix, and created a PR for it. There are probably other places where this is failing and I intend to make more PRs later as I encounter them.
https://github.com/magnussolution/magnusbilling7/pull/679
Expected behavior Page should not return "count()" error and stop. It should call releaseUserCredit without crashing.