Announcement

#1 2013-07-07 01:34:50

JAK
Member
2013-07-07
62

Exif_View division by Zero

Images from one of my cameras, a Casio QV-R61, generates the following message when adding the photos to the gallery and when they are displayed with the metadata selected:

Warning: Division by zero in /share/MD0_DATA/Web/piwigo/plugins/exif_view/main.inc.php on line 257

See example at http://jak.qcloudnas.com/piwigo/picture … category/1

It appears to be something to do with the exif_view plugin. Can anything be edited to resolve this please?

Thanks,

John

Offline

 

#2 2013-07-07 18:56:58

JAK
Member
2013-07-07
62

Re: Exif_View division by Zero

Examined the file main.inc.php and note that line 257 relates to the section dealing with Digital zoom. I always have digital zoom turned off so would rem'ing out the lines 254-257 prevent this error?

John

Offline

 

#3 2013-07-07 19:08:19

JAK
Member
2013-07-07
62

Re: Exif_View division by Zero

Well it was lines 254-258. I've rem'ed them out now and the error has gone away.

I presume the original file still needs investigating to see if this error can be prevented.

John

Last edited by JAK (2013-07-07 22:29:54)

Offline

 

#4 2013-07-07 21:00:57

flop25
Piwigo Team
2006-07-06
7037

Re: Exif_View division by Zero

author notified


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2013-07-07 22:31:54

JAK
Member
2013-07-07
62

Re: Exif_View division by Zero

Thank you. If an original of one of the problem photos is required to help, please let me know.

John

Offline

 

#6 2013-08-20 08:34:25

Kalle
Member
2012-08-17
89

Re: Exif_View division by Zero

i have the same problem:

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

Warning: Cannot modify header information - headers already sent by (output started at /.../galerie/piwigo/plugins/exif_view/main.inc.php:257) in /.../galerie/piwigo/include/page_header.php on line 101

Offline

 

#7 2015-08-04 09:52:26

MERLEN
Guest

Re: Exif_View division by Zero

I've the same error

I've corrected the probleme with this code :

   // distance to subject
   if (!(strpos($key, 'SubjectDistance') === FALSE)) {
      $tokens = explode('/', $value);
      if (isset($tokens[1]))
      {
        if ($tokens[1] > 0)
        {
          $distance = $tokens[0]/$tokens[1];
        }
        else
        {
          $distance = $tokens[0];
        }
      }
      else
      { 
        $distance = $value;
      }
      return $distance.' m';
   }

 

#8 2017-10-26 08:47:14

Digidani
Member
2017-10-20
23

Re: Exif_View division by Zero

Hello,

I get this erros around 30 times - only at the page of "Newest Pictures" so far. Here is the full message:

Code:

Warning: Division by zero in /www/htdocs/w0089eb4/dhkfotos/plugins/exif_view/main.inc.php on line 283

What can I do against them? Is there a fix? Please help me...

Offline

 

Board footer

Powered by FluxBB

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