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

Commit d3d5f1f

Browse files
author
Pavel Vyskočil
committed
Updated PerunAttribute process filter
* PerunAttribute process filter - Added support for numeric attributes
1 parent a406cf9 commit d3d5f1f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5+
#### Added
6+
- PerunAttribute process filter - Added support for numeric attributes
57

68
## [v3.0.4]
79
#### Fixed

lib/Auth/Process/PerunAttributes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function process(&$request)
7070
// convert $attrValue into array
7171
if (is_null($attrValue)) {
7272
$value = array();
73-
} elseif (is_string($attrValue)) {
73+
} elseif (is_string($attrValue) || is_numeric($attrValue)) {
7474
$value = array($attrValue);
7575
} elseif ($this->hasStringKeys($attrValue)) {
7676
$value = $attrValue;
@@ -80,7 +80,7 @@ public function process(&$request)
8080
throw new Exception(
8181
"sspmod_perun_Auth_Process_PerunAttributes - Unsupported attribute type. "
8282
.
83-
"Attribute name: $attrName, Supported types: null, string, array, associative array."
83+
"Attribute name: $attrName, Supported types: null, string, numeric, array, associative array."
8484
);
8585
}
8686

0 commit comments

Comments
 (0)