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
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:
// 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
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