SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 25, 2012, 05:06:29 am

Login with username, password and session length
Members
Total Members: 10072
Latest: Nike101NFL
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 60
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 57
Total: 58
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
| | | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Division by zero error in exif function  (Read 331 times)
VividViews
Newbie
*
Offline Offline

Posts: 35


View Profile
« 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:
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
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #1 on: September 17, 2011, 06:50:26 pm »

Added a check to next release to return n/a if dividing by zero.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 24, 2012, 08:02:50 am]

[May 24, 2012, 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.205 seconds with 20 queries.