1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-17 02:24:05 +02:00

Content: Issue - Return value of Flextype\Component\Arr\Arr::sort() must be of the type array, none returned - fixed

This commit is contained in:
Awilum
2018-12-19 20:09:41 +03:00
parent 395e1de32b
commit bffa632a8f

View File

@@ -293,11 +293,13 @@ class Content
}
// Sort and Slice pages if $raw === false
if (!$raw) {
$pages = Arr::sort($pages, $order_by, $order_type);
if (count($pages) > 0) {
if (!$raw) {
$pages = Arr::sort($pages, $order_by, $order_type);
if ($offset !== null && $length !== null) {
$pages = array_slice($pages, $offset, $length);
if ($offset !== null && $length !== null) {
$pages = array_slice($pages, $offset, $length);
}
}
}