Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignee_id must be nullable #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tanji
Copy link

@tanji tanji commented Jan 3, 2024

A primary IP can be unassigned and therefore assignee_id will be null, which led to an exception.

<b>Fatal error</b>:  Uncaught TypeError: Argument 12 passed to LKDev\HetznerCloud\Models\PrimaryIps\PrimaryIp::__construct() must be of the type integer, null given, called in /opt/ops-ip-lister/vendor/lkdevelopment/hetzner-cloud-php-sdk/src/Models/PrimaryIps/PrimaryIp.php on line 166 and defined in /opt/ops-ip-lister/vendor/lkdevelopment/hetzner-cloud-php-sdk/src/Models/PrimaryIps/PrimaryIp.php:96
Stack trace:
#0 /opt/ops-ip-lister/vendor/lkdevelopment/hetzner-cloud-php-sdk/src/Models/PrimaryIps/PrimaryIp.php(166): LKDev\HetznerCloud\Models\PrimaryIps\PrimaryIp-&gt;__construct(0000, 'base-image', '2023-12-23T02:0...', '1.1.1.1', 'ipv4', Array, false, Object(LKDev\HetznerCloud\Models\Protection), Array, Object(LKDev\HetznerCloud\Models\Datacenters\Datacenter), 'server', NULL, false)
#1 /opt/ops-ip-lister/vendor/lkdevelopment/hetzner-cloud-php-sdk/src/Models/PrimaryIps/PrimaryIps.php(163): LKDev\HetznerCloud\Models\PrimaryIps\PrimaryIp::parse(Object(stdClass))
#2 [internal function]: LKDev\HetznerCloud\Models\PrimaryIps\Prim in <b>/opt/ops-ip-lister/vendor/lkdevelopment/hetzner-cloud-php-sdk/src/Models/PrimaryIps/PrimaryIp.php</b> on line <b>96</b><br />

A primary IP can be unassigned and therefore assignee_id will be null, which led to an exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant