Kirby\Cms\Page::setNum(): Argument #1 ($num) must be of type ?int, string given, called in

encountering the following error, when accessing panel to update (save, sort, create) files, as well as using $page->update() methods, but the whoops message does not pinpoint where the problem is caused, i have tried to reinstall via composer with different versions from 3.8.x to 3.9.rc-1 however i can’t find the root of the problem.

Accessping pages without update() method does not cause the error.
A route without update() method runs, while the same route with it, doesn’t work.

All have been working before, but it seems like there has been a quirk.

Kirby\Cms\Page::setNum(): Argument #1 ($num) must be of type ?int, string given, called in kirby\src\Toolkit\Properties.php on line 137

Are you using any plugins and if yes, have you updated them to the releases compatible with your tested version?

What about custom code?

Since this error does not appear in a Starterkit, I would assume it has to do with yours or third party code (unless you can provide steps to reproduce this in a fresh Starterkit).