Skip to content

Commit

Permalink
Fix get IPTC data
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaouibacha committed Jul 16, 2024
1 parent 0d3b7f4 commit c2536db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Image/Metadata/IptcMetadataReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function extractFromData($data): array
foreach ($this->getIptcKeys() as $key => $name) {
if (isset($iptc[$key])) {
$value = $iptc[$key];
if ($key === '2#120' && is_array($value)) {
if (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 c2536db

Please sign in to comment.