fix: No current asset when ending up on Not Found page

This commit is contained in:
Graham Knop 2008-01-29 15:43:18 +00:00
parent 7627174884
commit 29045734e5
4 changed files with 5 additions and 3 deletions

View file

@ -25,6 +25,7 @@
- Testing Gallery::Utility a bit more thoroughly.
- fix: Photo EXIF data now gets cached correctly and sanitized for
references (since JSON won't store them and they're of no use to us anyway).
- fix: No current asset when ending up on Not Found page
7.5.0
- rfe: Search Asset returns URLs

View file

@ -1,7 +1,7 @@
package WebGUI;
our $VERSION = "7.5.0";
our $VERSION = '7.5.1';
our $STATUS = "beta";

View file

@ -194,7 +194,7 @@ sub purge {
# clean up version tag if empty
my $versionTag = WebGUI::VersionTag->new($session, $tagId);
if ($versionTag->getAssetCount == 0) {
if ($versionTag && $versionTag->getAssetCount == 0) {
$versionTag->rollback;
}
return 1;

View file

@ -50,7 +50,8 @@ sub handler {
my $output = "";
my $notFound = WebGUI::Asset->getNotFound($session);
if (defined $notFound) {
$output = eval { $notFound->www_view };
$session->asset($notFound);
$output = eval { $notFound->www_view };
}
else {
$session->errorHandler->error("The notFound page could not be instanciated!");