Skip to content

Commit

Permalink
send empty realm if not set to avoid the exception (#40)
Browse files Browse the repository at this point in the history
* send empty realm if not set

* always add realm to params

* Update composer.json

* Update composer.json

* Update composer.json

* Update runTests.yml

* Update composer.json
  • Loading branch information
lukasmatusiewicz authored Apr 25, 2023
1 parent d3769bb commit 324a189
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Run PHPUnit Tests
uses: php-actions/phpunit@master
with:
version: 9.6.7
php_version: 7.3
php_extensions: xdebug
bootstrap: vendor/autoload.php
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/phpunit": "<=9.6.7",
"internations/http-mock": "*"
}
}
6 changes: 1 addition & 5 deletions src/PrivacyIDEA.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,8 @@ public function enrollToken($username, $genkey, $type, $description = "") // No
return null;
}

if (!empty($this->realm))
{
$params["realm"] = $this->realm;
}

$params["user"] = $username;
$params["realm"] = $this->realm;
$params["genkey"] = $genkey;
$params["type"] = $type;
$params["description"] = in_array("description", $params) ? $description : "";
Expand Down

0 comments on commit 324a189

Please sign in to comment.