From 97b5c1745b6a0012ec675fe5f154046e0f26617a Mon Sep 17 00:00:00 2001 From: kitos7 <109901930+kitos7@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:10:21 +0300 Subject: [PATCH] Update PipelineModel.php add check on null and cast to string --- src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php b/src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php index 184f6778..70105cb3 100644 --- a/src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php +++ b/src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php @@ -65,7 +65,7 @@ public static function fromArray(array $pipeline): self $model = new self(); $model->setId($pipeline['id']); - $model->setName($pipeline['name']); + $model->setName((string)($pipeline['name'] ?? '')); $model->setSort($pipeline['sort']); $model->setAccountId($pipeline['account_id']); $model->setIsMain($pipeline['is_main']);