Support » Plugin: WP MediaTagger » Division by zero in mediatagger.php ($img_info)

  • Hello,
    recently appeared this problem:
    over the results are displayed division by zero warnings in mediatagger.php on lines 996, 1780, and 1784:
    $img_w = round($media_info->w * $img_h / $media_info->h);
    $img_ratio = $img_info->h/$img_info->w;
    $img_w = round($img_info->w * $img_h / $img_info->h, 0);

    Thanks,
    (I have the 4.0.5 release)

    https://wordpress.org/plugins/wp-mediatagger/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author phd38

    (@phd38)

    Means that the getimagesize() PHP function does not return a valid number – then null is used instead. For a reason I can hardly explain.

    What is the PHP version ?

    Merci pour la réponse.
    PHP 5.4

    Plugin Author phd38

    (@phd38)

    What is the image file size of the concerned image ?

    It has then to be compared to the maximum allowed filesize. This is a server setup for your PHP environment. You can check it with phpinfo() ; check the upload_max_filesize parameter.

    Does this happen for all your images ?

    upload_max_filesize = 300 M
    And, of course, no image is bigger!
    Yes it happens for all images.
    I can send you the full result of phpinfo if it can help.
    Merci

    Plugin Author phd38

    (@phd38)

    Ouch – that’s a pain, I suspect we deal with a specific server setup. I would have to equip the code with debug instruction to trace the exec. I will when time permits.

    Hi, I have this same issue but not with all images. I suspect it might be caused by old media that was tagged but I have since deleted from WordPress. Could it be that?

    If so is there a way I can ‘audit’ my database? Bear in mind I am not a coder.

    Unfortunately I can’t share my site with you.

    Kind Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Division by zero in mediatagger.php ($img_info)’ is closed to new replies.