From 95918c04102238e6c184e07f526e5ff48854bd53 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 15 Oct 2025 01:06:00 +0200 Subject: [PATCH] SoundDetailPage/Fixup * fix exception when assigning WorldState conditions to the zones tab --- endpoints/sound/sound.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/sound/sound.php b/endpoints/sound/sound.php index e2512285..b88da8ef 100644 --- a/endpoints/sound/sound.php +++ b/endpoints/sound/sound.php @@ -212,7 +212,7 @@ class SoundBaseResponse extends TemplateResponse implements ICache } } - if ($worldStates = array_filter($zoneIds, function ($x) { return $x['worldStateId'] > 0; })) + if ($worldStates = array_filter($zoneIds, fn($x) => $x['worldStateId'] > 0)) { $tabData['extraCols'] = ['$Listview.extraCols.condition']; @@ -222,7 +222,7 @@ class SoundBaseResponse extends TemplateResponse implements ICache Conditions::extendListviewRow($zoneData[$state['id']], Conditions::SRC_NONE, $this->typeId, [Conditions::WORLD_STATE, $state['worldStateId'], $state['worldStateValue']]); else foreach ($zoneData as &$d) - if (in_array($state['id'], $d['subzones'])) + if (in_array($state['id'], $d['subzones'] ?? [])) Conditions::extendListviewRow($d, Conditions::SRC_NONE, $this->typeId, [Conditions::WORLD_STATE, $state['worldStateId'], $state['worldStateValue']]); } }