Skip to content

Commit

Permalink
Merge pull request #4 from Daniel-KM/master
Browse files Browse the repository at this point in the history
Bug quand on utilise un media sans fichier.
  • Loading branch information
symac authored Dec 10, 2020
2 parents d11d4bc + de38c00 commit a37af8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ public function extractOcr(Event $event): void
$hasPdf = false;
$targetFilename = null;
foreach ($item->getMedia() as $media) {
if (strtolower($media->getExtension()) === 'pdf' && $media->getMediaType() === 'application/pdf') {
if (strtolower((string) $media->getExtension()) === 'pdf'
&& $media->getMediaType() === 'application/pdf'
) {
$hasPdf = true;
$targetFilename = basename($media->getSource(), '.pdf') . '.xml';
break;
Expand Down
2 changes: 1 addition & 1 deletion config/module.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ author = "bubdxm, completed by Daniel Berthereau"
author_link = "https://github.com/symac"
module_link = "http://github.com/bubdxm/Omeka-S-module-ExtractOcr"
configurable = true
version = "3.3.2"
version = "3.3.2.1"
omeka_version_constraint = "^3.0.0"

0 comments on commit a37af8f

Please sign in to comment.