r32938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32937‎ | r32938 | r32939 >
Date:05:50, 8 April 2008
Author:aaron
Status:old
Tags:
Comment:
Check if rev_parent_id is set first
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Revision.php
@@ -274,8 +274,12 @@
275275 $this->mMinorEdit = intval( $row->rev_minor_edit );
276276 $this->mTimestamp = $row->rev_timestamp;
277277 $this->mDeleted = intval( $row->rev_deleted );
278 - $this->mParentId = intval( $row->rev_parent_id );
279278
 279+ if( !isset( $row->rev_parent_id ) )
 280+ $this->mParentId = 0;
 281+ else
 282+ $this->mParentId = intval( $row->rev_parent_id );
 283+
280284 if( !isset( $row->rev_len ) || is_null( $row->rev_len ) )
281285 $this->mSize = null;
282286 else

Status & tagging log