diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e009a8..c68a730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] + +### Fixed + +- Decode dynamic group search filter as an array instead of an object + ## [1.1.3] - 2026-05-05 ### Fixed diff --git a/inc/computergroupdynamic.class.php b/inc/computergroupdynamic.class.php index 8c4492d..a61eac8 100644 --- a/inc/computergroupdynamic.class.php +++ b/inc/computergroupdynamic.class.php @@ -29,6 +29,7 @@ */ use function Safe\json_decode; +use function Safe\unserialize; use function Safe\json_encode; use function Safe\ob_start; use function Safe\ob_get_clean; @@ -182,7 +183,7 @@ private function countDynamicItems() public function isDynamicSearchMatchComputer(Computer $computer) { // add new criteria to force computer ID - $search = json_decode((string) $this->fields['search']); + $search = json_decode((string) $this->fields['search'], true, 512, JSON_THROW_ON_ERROR); $search['criteria'][] = [ 'link' => 'AND',