Skip to content

AmoCRM\Models\NoteType\OnlyTextParamNote::getText(): Return value must be of type string, null returned #621

@VasyaHH

Description

@VasyaHH

В некоторых случаях getText может возвращать null.
Метод объявлен так:

    /**
     * @return string
     */
    public function getText(): string
    {
        return $this->text;
    }

Ошибка появляется, когда я вызываю $note->toArray();

Возможно, стоит стоит сделать: ?string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions