We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51add6b commit 609f8c8Copy full SHA for 609f8c8
lib/PHPExif/Mapper/Native.php
@@ -165,7 +165,12 @@ public function mapRawData(array $data)
165
break;
166
case self::FOCALLENGTH:
167
$parts = explode('/', $value);
168
- $value = (int) reset($parts) / (int) end($parts);
+ // Avoid division by zero if focal length is invalid
169
+ if (end($parts) == '0') {
170
+ $value = 0;
171
+ } else {
172
+ $value = (int) reset($parts) / (int) end($parts);
173
+ }
174
175
case self::XRESOLUTION:
176
case self::YRESOLUTION:
0 commit comments