Skip to content

Commit 6b9d39c

Browse files
committed
Fixes Issue 49
1 parent a99121d commit 6b9d39c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
1.2.0beta3 (2010-??-??)
22
* Fixed: Custom properties were not propertly sent back for allprops
33
requests.
4+
* Fixed: Issue 49, incorrect parsing of PROPPATCH, affecting Office 2007.
45

56
1.2.0beta2 (2010-05-04)
67
* Fixed: Issue 46: Fatal error for some non-existant nodes.

lib/Sabre/DAV/Server.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,21 +1681,16 @@ public function parsePropPatchRequest($body) {
16811681

16821682
$innerProperties = Sabre_DAV_XMLUtil::parseProperties($child, $this->propertyMap);
16831683

1684-
// There should be exactly one
1685-
if (count($innerProperties)!==1)
1686-
throw new Sabre_DAV_Exception_BadRequest('Only one {DAV:}prop may appear in any ' . $operation);
1684+
foreach($innerProperties as $propertyName=>$propertyValue) {
16871685

1688-
reset($innerProperties);
1686+
if ($operation==='{DAV:}remove') {
1687+
$propertyValue = null;
1688+
}
16891689

1690-
$propertyName = key($innerProperties);
1691-
$propertyValue = current($innerProperties);
1690+
$newProperties[$propertyName] = $propertyValue;
16921691

1693-
if ($operation==='{DAV:}remove') {
1694-
$propertyValue = null;
16951692
}
16961693

1697-
$newProperties[$propertyName] = $propertyValue;
1698-
16991694
}
17001695

17011696
return $newProperties;

0 commit comments

Comments
 (0)