Skip to content

Commit f86c03b

Browse files
Daniel BerthereauDaniel Berthereau
authored andcommitted
Cleaned code.
1 parent b998a29 commit f86c03b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Job/MediaDimensions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function perform(): void
8080
$services = $this->getServiceLocator();
8181
$api = $services->get('Omeka\ApiManager');
8282

83-
$query = $this->getArg('query', []) ?? [];
83+
$query = $this->getArg('query') ?: [];
8484
if (is_string($query)) {
8585
$sQuery = [];
8686
parse_str($query, $sQuery);

src/Mvc/Controller/Plugin/MediaDimension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ protected function getDimensionsLocal(string $filepath, ?string $mainMediaType =
230230
*/
231231
private function fixOggDuration(array $data): array
232232
{
233+
if (!isset($data['mime_type'])) {
234+
return $data;
235+
}
233236
if ($data['mime_type'] !== 'audio/ogg' && $data['mime_type'] !== 'video/ogg') {
234237
return $data;
235238
}

0 commit comments

Comments
 (0)