1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Fix issue where adding a new page was broken by commit b47297fd4a

This commit is contained in:
Ryan Cramer
2021-12-28 09:03:59 -05:00
parent 18ae00f485
commit 3c983f9b51
2 changed files with 5 additions and 3 deletions

View File

@@ -1873,7 +1873,11 @@ class PagesEditor extends Wire {
if($template) $options['template'] = $template;
if($class) $options['pageClass'] = $class;
unset($options['id']); // just in case it was there
if(isset($options['id']) && ctype_digit("$options[id]") && (int) $options['id'] > 0) {
$options['id'] = (int) $options['id'];
} else {
unset($options['id']);
}
return $options;
}