Browse Source

Make sure transparency is an integer when saving a calendar

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v12.0.0beta1
Joas Schilling 7 years ago
parent
commit
43143e170e
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      apps/dav/lib/CalDAV/CalDavBackend.php

+ 2
- 2
apps/dav/lib/CalDAV/CalDavBackend.php View 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];

Loading…
Cancel
Save