Skip to content

Commit

Permalink
Merge pull request #33265 from owncloud/emptyPropfindResult
Browse files Browse the repository at this point in the history
return false if propfind result is empty
  • Loading branch information
phil-davis authored Oct 23, 2018
2 parents 5971d62 + 5f35ec8 commit e0871ca
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -2706,16 +2706,18 @@ public function findFileFromPropfindResponse($user, $fileNameToSearch) {
$this->parseResponseIntoXml();
}
$multistatusResults = $this->responseXml["value"];
foreach ($multistatusResults as $multistatusResult) {
$filePath = $multistatusResult['value'][0]['value'];
$fullWebDavPath = \ltrim(
$this->getBasePath() . "/" . $this->getDavFilesPath($user) . "/",
"/"
);
$fileName = \str_replace($fullWebDavPath, "", $filePath);
$fileName = \rawurldecode($fileName);
if ($fileName === $fileNameToSearch) {
return $multistatusResult;
if ($multistatusResults !== null) {
foreach ($multistatusResults as $multistatusResult) {
$filePath = $multistatusResult['value'][0]['value'];
$fullWebDavPath = \ltrim(
$this->getBasePath() . "/" . $this->getDavFilesPath($user) . "/",
"/"
);
$fileName = \str_replace($fullWebDavPath, "", $filePath);
$fileName = \rawurldecode($fileName);
if ($fileName === $fileNameToSearch) {
return $multistatusResult;
}
}
}
return false;
Expand Down

0 comments on commit e0871ca

Please sign in to comment.