diff --git a/classPhpPsdReader.php b/classPhpPsdReader.php index c19df67..814ede0 100644 --- a/classPhpPsdReader.php +++ b/classPhpPsdReader.php @@ -1,4 +1,4 @@ -infoArray['error'])) return ''; else return $psdReader->getImage(); } -?> \ No newline at end of file diff --git a/php_image_magician.php b/php_image_magician.php index f867fca..a582cbb 100755 --- a/php_image_magician.php +++ b/php_image_magician.php @@ -1699,21 +1699,21 @@ public function getExif($debug=true) $exifData = exif_read_data($this->fileName, 'IFD0'); // *** Format the apperture value - $ev = $exifData['ApertureValue']; + $ev = isset($exifData['ApertureValue']) ? $exifData['ApertureValue'] : ''; $apPeicesArray = explode('/', $ev); if (count($apPeicesArray) == 2) { $apertureValue = round($apPeicesArray[0] / $apPeicesArray[1], 2, PHP_ROUND_HALF_DOWN) . ' EV'; } else { $apertureValue = '';} // *** Format the focal length - $focalLength = $exifData['FocalLength']; + $focalLength = isset($exifData['FocalLength']) ? $exifData['FocalLength'] : ''; $flPeicesArray = explode('/', $focalLength); if (count($flPeicesArray) == 2) { $focalLength = $flPeicesArray[0] / $flPeicesArray[1] . '.0 mm'; } else { $focalLength = '';} // *** Format fNumber - $fNumber = $exifData['FNumber']; + $fNumber = isset($exifData['FNumber']) ? $exifData['FNumber'] : ''; $fnPeicesArray = explode('/', $fNumber); if (count($fnPeicesArray) == 2) { $fNumber = $fnPeicesArray[0] / $fnPeicesArray[1]; @@ -1725,11 +1725,11 @@ public function getExif($debug=true) // *** Resolve MeteringMode - $mm = $exifData['MeteringMode']; + $mm = isset($exifData['MeteringMode']) ? $exifData['MeteringMode'] : ''; $mm = $this->resolveMeteringMode($mm); // *** Resolve Flash - $flash = $exifData['Flash']; + $flash = isset($exifData['Flash']) ? $exifData['Flash'] : ''; $flash = $this->resolveFlash($flash);