aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo/photo_driver.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-07 17:07:44 -0700
committerzotlabs <mike@macgirvin.com>2017-06-07 17:07:44 -0700
commit416a82bf121e568569ed28590092d34dd25da6c0 (patch)
treeface76b8cda01ebfe8a1d3090235f1b524b75761 /include/photo/photo_driver.php
parent40b9130c63fbcc5bfd4ba5feb5463000dfe99d43 (diff)
parent55836e8ca65ca9a2ae25591de3232470d7a50049 (diff)
downloadvolse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.tar.gz
volse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.tar.bz2
volse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r--include/photo/photo_driver.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index cc1f3b5d0..eb61578e1 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -252,11 +252,10 @@ abstract class photo_driver {
*/
if(! $this->is_valid())
- return FALSE;
-
+ return false;
if((! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg'))
- return;
+ return false;
$exif = @exif_read_data($filename,null,true);
@@ -489,8 +488,10 @@ function guess_image_type($filename, $headers = '') {
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$ph = photo_factory('');
$types = $ph->supportedTypes();
- foreach ($types as $m=>$e){
- if ($ext==$e) $type = $m;
+ foreach($types as $m => $e) {
+ if($ext === $e) {
+ $type = $m;
+ }
}
}
@@ -502,7 +503,7 @@ function guess_image_type($filename, $headers = '') {
}
}
- logger('Photo: guess_image_type: type='.$type, LOGGER_DEBUG);
+ logger('Photo: guess_image_type: type = ' . $type, LOGGER_DEBUG);
return $type;
}