#1 2013-01-14 16:40:04

thimo
Member
2013-01-14
6

Bug plugin exif_view

Hi,

when adding particular photos I get the following error:

Warning: Division by zero in /.../piwigo/plugins/exif_view/main.inc.php on line 217

There we have the following code:

   // digital zoom
   if (!(strpos($key, 'DigitalZoomRatio') === FALSE)) {
      $tokens = explode('/', $value);
      return ($tokens[0]/$tokens[1]);
   }

$tokens[1] seems to be zero on some photos.

Offline

 

#2 2013-01-16 16:15:58

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13936

Re: Bug plugin exif_view

Hi thimo,

I have already solved a bug recently (on Piwigo.com only, I will backport it on the standard plugin, with other bug fixes, including the one you hvae just found) on SubjectDistance:

Code:

   // distance to subject
   if (!(strpos($key, 'SubjectDistance') === FALSE)) {
      $tokens = explode('/', $value);

      if (isset($tokens[1]))
      {
        if ($tokens[1] == 0)
        {
          return '∞';
        }
        else
        {
          $distance = $tokens[0]/$tokens[1];
        }
      }
      else
      {
        $distance = $value;
      }
      return $distance.' m';
   }

Can you send me an example of photo that produces the bug on DigitalZoomRatio? ("plg" [at] "piwigo.org")

Offline

 

#3 2013-01-16 20:54:15

thimo
Member
2013-01-14
6

Re: Bug plugin exif_view

I uploaded a huge number of photos, so I don't know which one was affected.

Is there a function in the batch utilities that reads the exif data? Then I could retry on some photos.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact