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

Use of count() on objects that do not implement Countable breaks feature in Moip #680

Open
vivaEspanaDelMu opened this issue Sep 8, 2024 · 0 comments

Comments

@vivaEspanaDelMu
Copy link

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.

#679

Expected behavior
Page should not return "count()" error and stop. It should call releaseUserCredit without crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant