Doc comments state that these methods return ints. In order to ensure
that, values must be cast to int before they are returned.
With respect to selectRowCount(), follows-up
65f81d284386.
Change-Id: I108221ce4ad1b5b103b015fe875de54e04781741
if ( $count >= self::WL_UNREAD_LIMIT ) {
$vals['unreadcount'] = self::WL_UNREAD_LIMIT . '+';
} else {
- $vals['unreadcount'] = (int)$count;
+ $vals['unreadcount'] = $count;
}
}
if ( $res ) {
$row = $this->fetchRow( $res );
- $rows = ( isset( $row['rowcount'] ) ) ? $row['rowcount'] : 0;
+ $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
}
return $rows;
if ( $res ) {
$row = $this->fetchRow( $res );
- $rows = ( isset( $row['rowcount'] ) ) ? $row['rowcount'] : 0;
+ $rows = ( isset( $row['rowcount'] ) ) ? (int)$row['rowcount'] : 0;
}
return $rows;
$row = $this->fetchRow( $res );
if ( isset( $row['EstimateRows'] ) ) {
- $rows = $row['EstimateRows'];
+ $rows = (int)$row['EstimateRows'];
}
}
$rows *= $plan->rows > 0 ? $plan->rows : 1; // avoid resetting to zero
}
- return $rows;
+ return (int)$rows;
}
/**
$row = $this->fetchRow( $res );
$count = array();
if ( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
- $rows = $count[1];
+ $rows = (int)$count[1];
}
}