Skip to content

Commit

Permalink
PHP 7.4 fix for Pages::buildSort()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 2, 2019
1 parent 1d966a0 commit 238ba9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## mm/dd/2019

1. [](#bugfix)
* PHP 7.4 fix in `Pages::buildSort()`
* Fixed fatal error when `$page->id()` is null [#2731](https://github.com/getgrav/grav/pull/2731)
* Fixed cache conflicts on pages with no set id

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual
case 'folder':
$list[$key] = $child->folder();
break;
case (is_string($header_query[0])):
case (isset($header_query[0]) && is_string($header_query[0])):
$child_header = new Header((array)$child->header());
$header_value = $child_header->get($header_query[0]);
if (is_array($header_value)) {
Expand Down

0 comments on commit 238ba9b

Please sign in to comment.