Don't try to verify URL if the user has left it out when making a new event

This commit is contained in:
Zach Copley 2011-09-17 13:36:05 -07:00
parent 70fbdb6f94
commit 5aeb48fcb2

View File

@ -206,7 +206,7 @@ class NeweventAction extends Action
throw new ClientException(_m('Event must have an end time.'));
}
if (isset($this->url) && Validate::uri($this->url) === false) {
if (!empty($this->url) && Validate::uri($this->url) === false) {
// TRANS: Client exception thrown when trying to post an event with an invalid URL.
throw new ClientException(_m('URL must be valid.'));
}