Create maintenance with one time period and save it. Edit it, add one new time period and delete old time period, try to save.
Undefined offset: 1 [api/classes/CMaintenance.php:715]