Improvement

This commit is contained in:
Matthew Exon 2019-09-22 17:05:23 +02:00 committed by Matthew Exon
parent d80120e0be
commit 5ca66335d8

View file

@ -650,6 +650,10 @@ function retriever_transform_images($a, &$item, $resource) {
Logger::log('@@@ retriever_transform_images before new Image', Logger::INFO); Logger::log('@@@ retriever_transform_images before new Image', Logger::INFO);
$image = new Image($data, $type); $image = new Image($data, $type);
Logger::log('@@@ retriever_transform_images after new Image', Logger::INFO); Logger::log('@@@ retriever_transform_images after new Image', Logger::INFO);
if (!$image->isValid()) {
Logger::log('retriever_transform_images: invalid image found at URL ' . $resource['url'] ' for item ' . $item['id'], Logger::WARNING);
return;
}
Logger::log('@@@ retriever_transform_images before Photo::store', Logger::INFO); Logger::log('@@@ retriever_transform_images before Photo::store', Logger::INFO);
$photo = Photo::store($image, $uid, $cid, $rid, $filename, $album, 0, 0, "", "", "", "", $desc); $photo = Photo::store($image, $uid, $cid, $rid, $filename, $album, 0, 0, "", "", "", "", $desc);
Logger::log('@@@ retriever_transform_images after Photo::store', Logger::INFO); Logger::log('@@@ retriever_transform_images after Photo::store', Logger::INFO);