WordPress.org

Ready to get started?Download WordPress

Forums

Crop-Thumbnails
[resolved] Division by Zero warnings (5 posts)

  1. Travis Ballard
    Member
    Posted 1 year ago #

    Just installed the plugin and when the thickbox window pops up there is a bunch of division by zero warnings ( if you have wp_debug enabled ). Here's a patch that surpresses those https://gist.github.com/4400528

    http://wordpress.org/extend/plugins/crop-thumbnails/

  2. Volkmar Kantor
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Travis,
    thanks, but i will not use these code. If you have a division by zero warning you probably have add a image-size with a height or width of zero (search for add_image_size in your theme).
    That's no proper value for a image-size. Please check, and fix your code if needed.

    If there still an error, then please post your settings.

    These warning is also described here: http://wordpress.org/support/topic/cropped-images-are-not-saved-error-mess?replies=5#post-3532773

  3. Travis Ballard
    Member
    Posted 1 year ago #

    How is it not a proper value when they default to 0? http://codex.wordpress.org/Function_Reference/add_image_size

    By setting it to 0 you allow it to set a max height or width and let the other value be flexible.

  4. Volkmar Kantor
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Travis,
    thanks for that. Sorry had never readed about the default value.

    So there will be a fix for that in the next version.

  5. Travis Ballard
    Member
    Posted 1 year ago #

    Not a problem. Glad I could help :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.