You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Получаю ошибку при синхронизации модели Fatal error: Uncaught TypeError: Argument 1 passed to AmoCRM\Models\CompanyModel::setTags() must be an instance of AmoCRM\Collections\TagsCollection, null given, called in
Возникает тогда, когда у компании отсутствуют теги. Аналогичная история когда у компании нет связанных контактов.
// Получим компанию сделки
if(($company = $lead->getCompany())) {
// Засинхронизируем модель с amoCRM
$company = $apiClient->companies()->syncOne($company);
}
Решается добавление ?TagsCollection вместо TagsCollection в AmoCRM\Models\CompanyModel
public function setTags(?TagsCollection $tags): self
{
$this->tags = $tags;
return $this;
}
Аналогичная история и по некоторым другим методам моделей:
AmoCRM\Models\CompanyModel,
AmoCRM\Models\ContactModel
The text was updated successfully, but these errors were encountered:
Получаю ошибку при синхронизации модели
Fatal error: Uncaught TypeError: Argument 1 passed to AmoCRM\Models\CompanyModel::setTags() must be an instance of AmoCRM\Collections\TagsCollection, null given, called in
Возникает тогда, когда у компании отсутствуют теги. Аналогичная история когда у компании нет связанных контактов.
Решается добавление ?TagsCollection вместо TagsCollection в AmoCRM\Models\CompanyModel
Аналогичная история и по некоторым другим методам моделей:
AmoCRM\Models\CompanyModel,
AmoCRM\Models\ContactModel
The text was updated successfully, but these errors were encountered: