Open benjwalker opened 10 months ago
Hello @benjwalker I am sorry for the late reply.
Unfortunately, I do not have a Notion Pro plan to add multiple users and reproduce. Could you past the entire exception stack trace so I could understand better what is happening?
Apologies for the delay also, hadn't actually received the error in a while, but just triggered it, full error I get from my script is below...
Fatal error: Uncaught ValueError: "0" is not a valid backing value for enum "Notion\Users\UserType" in /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Users/User.php:42 Stack trace: #0 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Users/User.php(42): Notion\Users\UserType::from(NULL) #1 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Pages/Properties/People.php(42): Notion\Users\User::fromArray(Array) #2 [internal function]: Notion\Pages\Properties\People::Notion\Pages\Properties\{closure}(Array) #3 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Pages/Properties/People.php(44): array_map(Object(Closure), Array) #4 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Pages/Properties/PropertyFactory.php(26): Notion\Pages\Properties\People::fromArray(Array) #5 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Pages/Page.php(93): Notion\Pages\Properties\PropertyFactory::fromArray(Array) #6 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Databases/Query/Result.php(34): Notion\Pages\Page::fromArray(Array) #7 [internal function]: Notion\Databases\Query\Result::Notion\Databases\Query\{closure}(Array) #8 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Databases/Query/Result.php(36): array_map(Object(Closure), Array) #9 /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Databases/Client.php(99): Notion\Databases\Query\Result::fromArray(Array) #10 /home/wearearise/public_html/subdomains/qb/php/classes/quickbooks.php(416): Notion\Databases\Client->query(Object(Notion\Databases\Database), Object(Notion\Databases\Query)) #11 /home/wearearise/public_html/subdomains/qb/php/classes/router.php(85): Quickbooks->update() #12 /home/wearearise/public_html/subdomains/qb/index.php(7): Router->route(Array) #13 {main} thrown in /home/wearearise/public_html/subdomains/qb/vendor/mariosimao/notion-sdk-php/src/Users/User.php on line 42
When running the below query, if the returned page is assigned to a user that's been archived it throws a fatal error "Fatal error: Uncaught ValueError: "0" is not a valid backing value for enum "Notion\Users\UserType"".