We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 002d07f commit 5279727Copy full SHA for 5279727
lib/PHPExif/Adapter/Exiftool.php
@@ -110,7 +110,15 @@ public function getExifFromFile($file)
110
)
111
);
112
113
- $data = json_decode(utf8_encode($result), true);
+ if (!mb_check_encoding($result, "utf-8")) {
114
+ $result = utf8_encode($result);
115
+ }
116
+ $data = json_decode($result, true);
117
+ if (!is_array($data)) {
118
+ throw new RuntimeException(
119
+ 'Could not decode exiftool output'
120
+ );
121
122
123
// map the data:
124
$mapper = $this->getMapper();
0 commit comments