Skip to content

Commit

Permalink
(fix): check if ->status->statustype isset before retrieving status e…
Browse files Browse the repository at this point in the history
…xplanation
  • Loading branch information
Mike van den Hoek committed Dec 4, 2024
1 parent 7be6ac2 commit 8a31455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Endpoints/ZakenEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function buildEntity($data): Entity
$class = $this->entityClass;
$zaak = new $class($data, $this->client::CALLABLE_NAME, $this->client::CLIENT_NAME);

$statusToelichting = $zaak->status instanceof Status ? $zaak->status->statustype->statusExplanation() : '';
$statusToelichting = $zaak->status instanceof Status && isset($zaak->status->statustype) ? $zaak->status->statustype->statusExplanation() : '';
$zaak->setValue('leverancier', $zaak->getClientNamePretty());
$zaak->setValue('steps', $this->handleProcessStatusses($this->getStatussenSorted($zaak), $statusToelichting));
$zaak->setValue('status_history', $zaak->statussen);
Expand Down

0 comments on commit 8a31455

Please sign in to comment.