From c62deb7946f896e23eb0525f55f94d9580a4c7eb Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 15 Dec 2023 13:33:11 -0500 Subject: [PATCH] Minor fix in PagesEditor class --- wire/core/PagesEditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wire/core/PagesEditor.php b/wire/core/PagesEditor.php index 937edfc2..c56c3a69 100644 --- a/wire/core/PagesEditor.php +++ b/wire/core/PagesEditor.php @@ -353,7 +353,7 @@ class PagesEditor extends Wire { if(!$parent->id) $parent = $this->pages->get("include=all, template=$idStr"); } - if($parent->id) $page->parent = $parent; + if($parent && $parent->id) $page->parent = $parent; } // assign page name