Permalink
Browse files

MDL-37432 Calendar: Added check for empty calendar url

  • Loading branch information...
1 parent 7def533 commit 76657ed83ceea731e6627aa7c47c1ceeda6e0d49 Rajesh Taneja committed Jan 15, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 76657ed

Please sign in to comment.