Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit c5ca6c2

Browse files
committed
Bugfixes in getFacilityCapabilities
* Return [] instead of null in getFacilityCapability via RPC, if facilityCapability is not set
1 parent ef9a22e commit c5ca6c2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
1212
#### Fixed
1313
- Fixed the width of showed tagged idps in case the count of idps is equal to (x * 3) + 1
1414
- Using try{}catch{} to avoid to PerunException in PerunEntitlement.php
15+
- Return [] instead of null in getFacilityCapability via RPC, if facilityCapability is not set
1516

1617
## [v3.8.0]
1718
#### Changed

lib/AdapterRpc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,10 @@ public function getFacilityCapabilities($entityId)
558558
'attributeName' => 'urn:perun:facility:attribute-def:def:capabilities'
559559
])['value'];
560560

561+
if (empty($facilityCapabilities)) {
562+
$facilityCapabilities = [];
563+
}
564+
561565
return $facilityCapabilities;
562566
}
563567
}

0 commit comments

Comments
 (0)