Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 149
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 152
Total: 152

Author Topic: Division by zero error in exif function  (Read 3779 times)

0 Members and 1 Guest are viewing this topic.

Offline VividViews

  • Member
  • *
  • Posts: 35
    • View Profile
Division by zero error in exif function
« on: September 17, 2011, 06:18:59 pm »
SMF Error Log:

http://burningsky.org/index.php?action=gallery;sa=view&id=38
2: Division by zero
File: /home/bsky/public_html/Sources/Gallery2.php
Line: 10493

Line 10493 is in BOLD below

function exif_get_focal_length($FNumber,$FocalLength)
{
         $Fnumber = explode("/", $FNumber);
    $Fnumber = $Fnumber[0] / $Fnumber[1];
     $Focal = explode("/", $FocalLength);
     $Focal = $Focal[0] / $Focal[1];

     return round($Focal)."mm";
}

EXIF data shown for the image in question:

Code: [Select]
Exif data
ImageDescription OLYMPUS DIGITAL CAMERA
Date Taken June 14, 2002, 12:50 pm
Model C900Z,D400Z
Focal Length 6mm
ISO Speed 100
Make OLYMPUS OPTICAL CO.,LTD
DateTime 2002:06:14 13:13:33
ExposureBiasValue 0/10
MeteringMode 5

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: Division by zero error in exif function
« Reply #1 on: September 17, 2011, 06:50:26 pm »
Added a check to next release to return n/a if dividing by zero.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
22300 Views
Last post January 07, 2008, 02:36:45 am
by Arie.
0 Replies
6252 Views
Last post January 05, 2008, 07:15:49 pm
by Arie.
3 Replies
3906 Views
Last post September 23, 2008, 08:13:06 pm
by SMFHacks
2 Replies
4973 Views
Last post October 05, 2009, 02:20:12 pm
by Dasher
2 Replies
3123 Views
Last post January 28, 2011, 01:54:48 pm
by Michel68

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal