1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-13 17:34:04 +02:00

Fixed issue with exif throwing a warning if no exif data is returned

array_key_exists throws a warning if exif_read_data returns false, this resolves by confirming data is an array before it returns $data[$key]
This commit is contained in:
Matt Cannon
2013-09-25 11:31:12 +01:00
parent 8242dee952
commit 5465902cf2

View File

@@ -1439,7 +1439,7 @@ class Image
$data = exif_read_data($this->dirname .'/'. $this->basename, 'EXIF', false);
if (! is_null($key)) {
if (! is_null($key) && is_array($data)) {
return array_key_exists($key, $data) ? $data[$key] : null;
}