]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure transparency is an integer when saving a calendar 4166/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 15:58:33 +0000 (17:58 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CalDAV/CalDavBackend.php

index 7976c1490ff31a48512cffd5481cbaea7ac935e0..631593974e7ada66fdb7e045c700a42ab38120c1 100644 (file)
@@ -621,7 +621,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) {
@@ -674,7 +674,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];