Merge remote-tracking branch 'origin/1.7' into 1.7

This commit is contained in:
Matias Griese
2020-06-30 01:09:43 +03:00
2 changed files with 2 additions and 5 deletions

View File

@@ -9,6 +9,7 @@
* Fixed `Trying to get property 'username' of non-object` error in Flex [flex-objects#62](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/62)
* Fixed retina images not working in Flex [flex-objects#64](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/64)
* Fixed plugin initialization in CLI
* Fixed broken logic in `Page::topParent()` when dealing with first-level pages
# v1.7.0-rc.12
## 06/08/2020

View File

@@ -2331,11 +2331,7 @@ class Page implements PageInterface
*/
public function topParent()
{
$topParent = $this->parent();
if (!$topParent) {
return null;
}
$topParent = $this;
while (true) {
$theParent = $topParent->parent();