From: Joas Schilling Date: Thu, 30 Mar 2017 15:58:12 +0000 (+0200) Subject: Make sure transparency is an integer when saving a calendar X-Git-Tag: v11.0.3RC1~25^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F4167%2Fhead;p=nextcloud-server.git Make sure transparency is an integer when saving a calendar Signed-off-by: Joas Schilling --- diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index dbe86438238..b67e2339b67 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -617,7 +617,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription } $transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; if (isset($properties[$transp])) { - $values['transparent'] = $properties[$transp]->getValue()==='transparent'; + $values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent'); } foreach($this->propertyMap as $xmlName=>$dbName) { @@ -670,7 +670,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription switch ($propertyName) { case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' : $fieldName = 'transparent'; - $newValues[$fieldName] = $propertyValue->getValue() === 'transparent'; + $newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent'); break; default : $fieldName = $this->propertyMap[$propertyName];