Skip to content
Browse files

MDL-37432 Calendar: Added check for empty calendar url

  • Loading branch information...
1 parent a5ec499 commit 378cb038b2424a7d7b5fdc7186bcd18fbcdb81b6 @rajeshtaneja rajeshtaneja committed Jan 15, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 calendar/managesubscriptions_form.php
View
4 calendar/managesubscriptions_form.php
@@ -123,7 +123,9 @@ public function validation($data, $files) {
}
}
} else if (($data['importfrom'] == CALENDAR_IMPORT_FROM_URL)) {
- if (clean_param($data['url'], PARAM_URL) !== $data['url']) {
+ // Clean input calendar url.
+ $url = clean_param($data['url'], PARAM_URL);
+ if (empty($url) || ($url !== $data['url'])) {
$errors['url'] = get_string('invalidurl', 'error');
}
} else {

0 comments on commit 378cb03

Please sign in to comment.
Something went wrong with that request. Please try again.