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:
@@ -204,7 +204,7 @@ class Articles
|
||||
ksort($data);
|
||||
}
|
||||
|
||||
return $data ?? false;
|
||||
return $data ?? [];
|
||||
}
|
||||
|
||||
public static function getDataForSale($article)
|
||||
|
||||
Reference in New Issue
Block a user