aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-13 22:47:11 -0700
committerzotlabs <mike@macgirvin.com>2018-03-13 22:47:11 -0700
commit128d1f7aa8a11e0394913a10daef56cd4be450b1 (patch)
tree00b22cc9a3c7472cce0c824c04ca7a40c97ee185 /include/photo
parent09a841f3be2953fa8e346be9259b43cf68920741 (diff)
downloadvolse-hubzilla-128d1f7aa8a11e0394913a10daef56cd4be450b1.tar.gz
volse-hubzilla-128d1f7aa8a11e0394913a10daef56cd4be450b1.tar.bz2
volse-hubzilla-128d1f7aa8a11e0394913a10daef56cd4be450b1.zip
somewhere along the line the output of exif_read_data() changed and it no longer provides populated sections. Adjust for the new format and allow for the old because I cannot find documentation of this change anywhere. This affects photo rotation and the photo map feature.
Diffstat (limited to 'include/photo')
-rw-r--r--include/photo/photo_driver.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 6af753195..00284a288 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -289,12 +289,12 @@ abstract class photo_driver {
return false;
}
- $ort = $exif['IFD0']['Orientation'];
+ $ort = ((array_key_exists('IFD0',$exif)) ? $exif['IFD0']['Orientation'] : $exif['Orientation']);
if(! $ort) {
return false;
}
-
+
switch($ort) {
case 1: // nothing
break;