MDL-65262 core_calendar: change location param type
[moodle.git] / calendar / lib.php
index 6ef434f..02c2d97 100644 (file)
@@ -2849,7 +2849,7 @@ function calendar_add_icalendar_event($event, $unused = null, $subscriptionid, $
     }
 
     $eventrecord->location = empty($event->properties['LOCATION'][0]->value) ? '' :
     }
 
     $eventrecord->location = empty($event->properties['LOCATION'][0]->value) ? '' :
-            str_replace('\\', '', $event->properties['LOCATION'][0]->value);
+            trim(str_replace('\\', '', $event->properties['LOCATION'][0]->value));
     $eventrecord->uuid = $event->properties['UID'][0]->value;
     $eventrecord->timemodified = time();
 
     $eventrecord->uuid = $event->properties['UID'][0]->value;
     $eventrecord->timemodified = time();