isset() checks that the member is set *and* its value is not null,
so there's no point doing a second is_null() check.
This also fixes an E_NOTICE when rev_parent_id is not set since
is_null() was called on it after isset() returned false.
Change-Id: I07bf670236413436d23ee5d87d032608b25769ce
$this->mTimestamp = $row->rev_timestamp;
$this->mDeleted = intval( $row->rev_deleted );
- if( !isset( $row->rev_parent_id ) ) {
- $this->mParentId = is_null( $row->rev_parent_id ) ? null : 0;
+ if ( !isset( $row->rev_parent_id ) ) {
+ $this->mParentId = null;
} else {
$this->mParentId = intval( $row->rev_parent_id );
}
- if( !isset( $row->rev_len ) || is_null( $row->rev_len ) ) {
+ if ( !isset( $row->rev_len ) ) {
$this->mSize = null;
} else {
$this->mSize = intval( $row->rev_len );