fix: prevent error 500 on search with no results

``getArticlesToSell()`` returned ``false`` when no articles matched,
causing ``collect(false)`` to produce ``[false]``. The view then
iterated over that single-element array and tried to access array
offsets on a boolean value.
This commit is contained in:
Valentin Lab
2026-02-09 05:00:00 +01:00
parent 1f4177cdb3
commit e774113110

View File

@@ -204,7 +204,7 @@ class Articles
ksort($data);
}
return $data ?? false;
return $data ?? [];
}
public static function getDataForSale($article)