From 91175bfb491bf7dfc80ace9af4a51af79804d7f2 Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Wed, 18 Jan 2017 20:25:45 +0100 Subject: [PATCH] fix exif imagick bug when reading complete array of exif data --- src/Intervention/Image/Imagick/Commands/ExifCommand.php | 2 +- tests/ExifCommandTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Intervention/Image/Imagick/Commands/ExifCommand.php b/src/Intervention/Image/Imagick/Commands/ExifCommand.php index 3d54fedc..924522ca 100644 --- a/src/Intervention/Image/Imagick/Commands/ExifCommand.php +++ b/src/Intervention/Image/Imagick/Commands/ExifCommand.php @@ -53,7 +53,7 @@ class ExifCommand extends BaseCommand continue; } - $exif[substr($key, 6)] = $value; + $exif[substr($key, 5)] = $value; } $this->setOutput($exif); diff --git a/tests/ExifCommandTest.php b/tests/ExifCommandTest.php index 074ed664..7e7cd31d 100644 --- a/tests/ExifCommandTest.php +++ b/tests/ExifCommandTest.php @@ -67,6 +67,7 @@ class ExifCommandTest extends PHPUnit_Framework_TestCase $this->assertTrue($result); $this->assertTrue($command->hasOutput()); $this->assertInternalType('array', $command->getOutput()); + $this->assertEquals('Oliver Vogel', $command->getOutput()['Artist']); } public function testImagickFetchDefined()