From 08b70c39ab0931c365a124a9c24c721970d29950 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 8 Apr 2008 05:50:42 +0000 Subject: [PATCH] Check if rev_parent_id is set first --- includes/Revision.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Revision.php b/includes/Revision.php index f514c2b17d..bd3d38452d 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -274,7 +274,11 @@ class Revision { $this->mMinorEdit = intval( $row->rev_minor_edit ); $this->mTimestamp = $row->rev_timestamp; $this->mDeleted = intval( $row->rev_deleted ); - $this->mParentId = intval( $row->rev_parent_id ); + + if( !isset( $row->rev_parent_id ) ) + $this->mParentId = 0; + else + $this->mParentId = intval( $row->rev_parent_id ); if( !isset( $row->rev_len ) || is_null( $row->rev_len ) ) $this->mSize = null; -- 2.20.1