Skip to content

Commit

Permalink
Merge pull request #39461 from owncloud/fix-getLastShareId
Browse files Browse the repository at this point in the history
[tests-only] Fix return type of getLastShareId()
  • Loading branch information
phil-davis authored Nov 8, 2021
2 parents 759b1c1 + b9986de commit d9428c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/acceptance/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1939,11 +1939,14 @@ public function getLastShareIdOf(string $user):?int {
/**
* Retrieves the id of the last shared file
*
* @return SimpleXMLElement|null
* @return string|null
*/
public function getLastShareId():?SimpleXMLElement {
public function getLastShareId():?string {
if ($this->lastShareData && $this->lastShareData->data) {
return $this->lastShareData->data[0]->id;
// id is a SimpleXMLElement object that contains the share id
// which is a string.
// (It might be a numeric string or might not, either is fine.)
return (string) $this->lastShareData->data[0]->id;
} else {
return null;
}
Expand Down

0 comments on commit d9428c7

Please sign in to comment.