diff --git a/libraries/src/Table/Nested.php b/libraries/src/Table/Nested.php index 858a9cb5858e..962f61851ea0 100644 --- a/libraries/src/Table/Nested.php +++ b/libraries/src/Table/Nested.php @@ -1317,7 +1317,7 @@ public function rebuildPath($pk = null) $segments = $this->_db->loadColumn(); // Make sure to remove the root path if it exists in the list. - if ($segments[0] === 'root') { + if (!empty($segments) && $segments[0] === 'root') { array_shift($segments); }