From a128906dc0adc0eb04cf3fbf340d056bcf42850d Mon Sep 17 00:00:00 2001 From: Isabelle Date: Fri, 9 Jan 2026 10:52:21 +0100 Subject: [PATCH] fix(falcon-PS9): prevent 500 error on AJAX filtering by normalizing data Resolved a Fatal Error occurring during AJAX product listing requests (e.g., price slider). - Issue: In PHP 8.2+, accessing properties of a 'CategoryLazyArray' object using array syntax (dot notation) triggers a Fatal Error. - Cause: The Faceted Search module returns a LazyArray object during XHR requests, whereas standard page loads provide a native array. - Solution: Implemented a normalization block using JSON serialization to flatten the object into a standard associative array. This ensures template syntax compatibility regardless of the request type or property visibility (protected vs public). --- .../templates/catalog/_partials/category-footer.tpl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/falcon/templates/catalog/_partials/category-footer.tpl b/falcon/templates/catalog/_partials/category-footer.tpl index c3c07ff..faee68e 100644 --- a/falcon/templates/catalog/_partials/category-footer.tpl +++ b/falcon/templates/catalog/_partials/category-footer.tpl @@ -1,7 +1,15 @@ +{* Defensive: Handles LazyArray objects for category *} +{if is_object($category)} + {$category = $category|json_encode|json_decode:true} + {if isset($category.category)} + {$category = $category.category} + {/if} +{/if} + + \ No newline at end of file