Upgrade to 3.8.0
This commit is contained in:
@@ -45,7 +45,7 @@ trait HasChildren
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
if (is_a($this->children, 'Kirby\Cms\Pages') === true) {
|
||||
if ($this->children instanceof Pages) {
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ trait HasChildren
|
||||
*/
|
||||
public function childrenAndDrafts()
|
||||
{
|
||||
if (is_a($this->childrenAndDrafts, 'Kirby\Cms\Pages') === true) {
|
||||
if ($this->childrenAndDrafts instanceof Pages) {
|
||||
return $this->childrenAndDrafts;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ trait HasChildren
|
||||
*/
|
||||
public function drafts()
|
||||
{
|
||||
if (is_a($this->drafts, 'Kirby\Cms\Pages') === true) {
|
||||
if ($this->drafts instanceof Pages) {
|
||||
return $this->drafts;
|
||||
}
|
||||
|
||||
@@ -217,9 +217,9 @@ trait HasChildren
|
||||
{
|
||||
if ($drafts === true) {
|
||||
return $this->childrenAndDrafts()->index($drafts);
|
||||
} else {
|
||||
return $this->children()->index();
|
||||
}
|
||||
|
||||
return $this->children()->index();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user