mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Catch exception when PHP exiftool does not write file type
This commit is contained in:
@@ -129,7 +129,14 @@ class File
|
|||||||
$metadatas->add(new Metadata(TagFactory::getFromRDFTagname($tagname), $value));
|
$metadatas->add(new Metadata(TagFactory::getFromRDFTagname($tagname), $value));
|
||||||
}
|
}
|
||||||
|
|
||||||
$writer->write($this->getFile()->getRealPath(), $metadatas);
|
/**
|
||||||
|
* PHPExiftool throws exception on some files not supported
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
$writer->write($this->getFile()->getRealPath(), $metadatas);
|
||||||
|
} catch (\PHPExiftool\Exception\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$writer = $reader = $metadatas = null;
|
$writer = $reader = $metadatas = null;
|
||||||
|
Reference in New Issue
Block a user