diff --git a/application/controllers/SelfServiceController.php b/application/controllers/SelfServiceController.php index d6ac80f3..0b3b642f 100644 --- a/application/controllers/SelfServiceController.php +++ b/application/controllers/SelfServiceController.php @@ -275,7 +275,7 @@ class SelfServiceController extends ActionController // PluginsUrl => framework_plugins_url ]; $username = $settings->get('self-service/icinga_service_user'); - if (strlen($username)) { + if ($username !== null && strlen($username) > 0) { $params['icinga_service_user'] = $username; } diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index a6015798..d767b4c1 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -21,6 +21,9 @@ v1.10.2 (unreleased) * FEATURE: more details shown in error messages related to invalid characters (#2646) * FIX: snapshots for Baskets containing Baskets failed since v1.10 (#2644) +### REST API +* FIX: Self Service API returned invalid JSON on PHP 8.1 (#2614) + ### Internals * FIX: issue with empty activity log, deprecate outdated method (#2630)