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

Prevent "Division by zero" in avatar functions. #1578

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Nov 28, 2018

Changes

Makes sure that neither the divisor nor the divisee are zero, non-numeric, or unset, when trying to get a list of square image sizes.

Why

Fixes this:

PHP message: PHP Warning: Division by zero in /wp-content/themes/largo/inc/avatars/functions.php on line 63

Part of #1492.

Before merging:

  • tests pass
  • check on a post with a byline; I've only thus far tested it on pages.

@benlk benlk added type: bug priority: normal Must be completed before release of this version of plugin. labels Nov 28, 2018
@benlk benlk added this to the 0.6.1 - Bugfixes milestone Nov 28, 2018
@benlk
Copy link
Collaborator Author

benlk commented Nov 28, 2018

Works on a post.

@benlk benlk merged commit a182c52 into 0.5-dev Nov 28, 2018
benlk added a commit to INN/umbrella-inndev that referenced this pull request Nov 29, 2018
@benlk benlk deleted the 1492-avatar-divide-by-zero branch December 7, 2018 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal Must be completed before release of this version of plugin. type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant