Skip to content

Commit 93f583d

Browse files
committedAug 28, 2012
getLastPost in Thread.pm should not cast its data, but allow the asset to determine its own type.
1 parent 55893c0 commit 93f583d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
7.10.27
22
- fixed #12379: userImport documentation error
33
- fixed #12382: WebGUI::Crud does not work with all form types
4+
- fixed: Threads with no posts return the wrong lastReply data.
45

56
7.10.26
67
- fixed: Template diagnostics when called without a session asset.

‎lib/WebGUI/Asset/Post/Thread.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ sub getLastPost {
450450
my $lastPostId = $self->get("lastPostId");
451451
my $lastPost;
452452
if ($lastPostId) {
453-
$lastPost = WebGUI::Asset::Post->new($self->session, $lastPostId);
453+
$lastPost = WebGUI::Asset->newByDynamicClass($self->session, $lastPostId);
454454
}
455455
return $lastPost if (defined $lastPost);
456456
return $self;

0 commit comments

Comments
 (0)
Please sign in to comment.