diff --git a/CHANGELOG.md b/CHANGELOG.md
index c079ed7923..cb92473b3b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php
index cd0dcc09de..0c3812944a 100644
--- a/system/src/Grav/Common/Page/Pages.php
+++ b/system/src/Grav/Common/Page/Pages.php
@@ -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)) {