Bug when trying to add a new session

I found a little bug in the Add new session page. When “Multiple sessions” is selected and the user select days of week that are not in the date interval selected above, once “Save” is pressed the page returns a “Programming error”. I fixed it.