Added better error handling in asset instanciation.
This commit is contained in:
parent
886d8215b8
commit
1c4f84ab13
2 changed files with 5 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
http://www.plainblack.com/bugs/tracker/trouble-with-search-users
|
http://www.plainblack.com/bugs/tracker/trouble-with-search-users
|
||||||
- fix: Fixed an unhandled exception in Workflow/Activity/PurgeOldAssetRevisions.pm
|
- fix: Fixed an unhandled exception in Workflow/Activity/PurgeOldAssetRevisions.pm
|
||||||
- Added better error handling for asset instanciation in version tags.
|
- Added better error handling for asset instanciation in version tags.
|
||||||
|
- Added better error handling in asset instanciation.
|
||||||
- fix: Image::Magick->Scale does nothing if given dimensions < 1, so make sure
|
- fix: Image::Magick->Scale does nothing if given dimensions < 1, so make sure
|
||||||
they are large enough when generating thumbnails in Storage/Image.pm
|
they are large enough when generating thumbnails in Storage/Image.pm
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1510,7 +1510,10 @@ sub new {
|
||||||
$where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")";
|
$where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")";
|
||||||
}
|
}
|
||||||
$properties = $session->db->quickHashRef($sql.$where);
|
$properties = $session->db->quickHashRef($sql.$where);
|
||||||
return undef unless (exists $properties->{assetId});
|
unless (exists $properties->{assetId}) {
|
||||||
|
$session->errorHandler->error("Asset $assetId $class $revisionDate is missing properties. Consult your database tables for corruption. ");
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
$cache->set($properties,60*60*24);
|
$cache->set($properties,60*60*24);
|
||||||
}
|
}
|
||||||
if (defined $properties) {
|
if (defined $properties) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue