]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure transparency is an integer when saving a calendar 4167/head
authorJoas Schilling <coding@schilljs.com>
Thu, 30 Mar 2017 15:58:12 +0000 (17:58 +0200)
committerJoas Schilling <coding@schilljs.com>
Thu, 30 Mar 2017 16:01:21 +0000 (18:01 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CalDAV/CalDavBackend.php

index dbe86438238598a0a7fa13fc455f1b7ca41b218f..b67e2339b67afd840c7ce98c753a614b4d9d4a29 100644 (file)
@@ -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];