From d417de5e42c4e2c73b91b69fd07822fa8bea7c0a Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Fri, 5 Jun 2026 11:45:28 +0200 Subject: [PATCH 1/2] Fix - Ensure selected states is always an array in inventory selector --- inc/inventory.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/inventory.class.php b/inc/inventory.class.php index 63efcbb4..de30da4d 100644 --- a/inc/inventory.class.php +++ b/inc/inventory.class.php @@ -45,6 +45,9 @@ public static function selectorForMultipleStates($field, $condition = [], $label $selected_states = []; if (isset($_SESSION['mreporting_values'][$field])) { $selected_states = $_SESSION['mreporting_values'][$field]; + if (!is_array($selected_states)) { + $selected_states = []; + } } else { $selected_states = self::getDefaultState(); } From 49f829f496a3f078edddf76e4a6383ac53d226f2 Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Fri, 5 Jun 2026 11:47:13 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fdd3172..d6025b0e 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 + +- Fix - Ensure selected states is always an array in inventory selector + ## [1.9.6] - 2026-05-22 ### Fixed