Make sure transparency is an integer when saving a calendar

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-30 17:58:12 +02:00
parent fc43bbe2c0
commit 21b413b08b
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

View 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];