1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Attempt fix for issue #1714, plus a couple other minor unrelated class code improvements that were already in the queue

This commit is contained in:
Ryan Cramer
2023-04-07 09:34:18 -04:00
parent de8307a2a9
commit f4a05789f1
3 changed files with 22 additions and 19 deletions

View File

@@ -363,7 +363,7 @@ class PagesEditor extends Wire {
// assign sort order
if($page->sort < 0) {
$page->sort = $page->parent->numChildren();
$page->sort = ($parent->id ? $parent->numChildren() : 0);
}
// assign any default values for fields