Какое-то запудренное условие, хотя задача вроде элементарная
$dates = [];
$finish = null;
foreach( \IPS\Db::i()->select( '*', 'core_member_history', array( 'log_app=? and log_member=? and log_type=?', 'core', 6, 'group' ) ) as $row )
{
$data = json_decode( $row['log_data'], TRUE );
$dates[] = [
'start' => $data['log_date'],
'finish' => $finish
];
$finish = $row['log_date'];
}