Skip to content

Commit

Permalink
Fix update file description
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaouibacha committed Jun 11, 2024
1 parent b8d2336 commit 0d3b7f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Image/Metadata/IptcMetadataReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ protected function extractFromData($data): array
$iptcData = [];
foreach ($this->getIptcKeys() as $key => $name) {
if (isset($iptc[$key])) {
$iptcData[$name] = ($isUtf8Encoded && is_string($iptc[$key])) ? utf8_encode($iptc[$key]) : $iptc[$key];
$value = $iptc[$key];
if ($key === '2#120' && is_array($value)) {
$value = array_values($value)[0] ?? null;
}
$iptcData[$name] = ($isUtf8Encoded && is_string($value)) ? utf8_encode($value) : $value;
}
}

Expand Down

0 comments on commit 0d3b7f4

Please sign in to comment.