Skip to content

Commit

Permalink
Bugfix-Release (#35)
Browse files Browse the repository at this point in the history
* Klassen dürfen keinen teilweisen Namespace haben.

Also in `FriendsOfRedaxo\addon\MediapoolExif` wird `Exception\NotFoundException` nicht gefunden.
Was funktioniert:
- voll qualifiziert im Code: new \FriendsOfRedaxo\addon\MediapoolExif\NotFoundException`
- voll qualifiziert als use: `use \FriendsOfRedaxo\addon\MediapoolExif\NotFoundException;` und `new NotFoundException()`

fixes #34
  • Loading branch information
akrys authored Mar 9, 2024
1 parent 8dda07d commit 2d1fbe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/MediapoolExif.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use FriendsOfRedaxo\addon\MediapoolExif\Enum\IptcDefinitions;
use FriendsOfRedaxo\addon\MediapoolExif\Format\FormatInterface;
use FriendsOfRedaxo\addon\MediapoolExif\Format\Geo;
use FriendsOfRedaxo\addon\MediapoolExif\Exception\IptcException;
use rex;
use rex_extension_point;
use rex_fragment;
Expand Down Expand Up @@ -290,7 +291,7 @@ protected static function getIptcData(rex_media $media): array
$return[$case->getLabel()] = count($iptc[$case->getCode()]) == 1 ? $iptc[$case->getCode()][0] : $iptc[$case->getCode()];
}
}
} catch (Exception\IptcException $e) {
} catch (IptcException $e) {
return $return;
}
return $return;
Expand All @@ -301,22 +302,22 @@ protected static function getIptcData(rex_media $media): array
*
* @param rex_media $media
* @return array
* @throws Exception\IptcException
* @throws IptcException
*/
private static function parseIptc(rex_media $media): array
{
$path = rex_path::media($media->getFileName());
$size = getimagesize($path, $info);
if (!$size) {
throw new Exception\IptcException('no size');
throw new IptcException('no size');
}

if (isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
}

if (!$iptc) {
throw new Exception\IptcException('no iptc');
throw new IptcException('no iptc');
}
return $iptc;
}
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: mediapool_exif
version: '3.0'
version: '3.0.1'
author: 'FriendsOfREDAXO'
supportpage: https://github.com/FriendsOfREDAXO/mediapool_exif

Expand Down

0 comments on commit 2d1fbe3

Please sign in to comment.