This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Description
Here is the full PHP error:
Catchable fatal error: Argument 1 passed to Ctct\Components\Activities\ActivityError::create() must be of the type array, string given, called in Ctct\Components\Activities\Activity.php on line 47 and defined in Ctct\Components\Activities\ActivityError.php on line 24
The API responds with something like the following:
array(10) {
["id"]=> string(36) "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
["type"]=> string(12) "ADD_CONTACTS"
["status"]=> string(8) "COMPLETE"
["errors"]=> array(2) {
[0]=> string(23) "Line 355: Invalid email"
[1]=> string(24) "Line 1068: Invalid email"
}
["file_name"]=> string(30) "default_list.txt"
["start_date"]=> string(24) "2017-04-11T13:55:30.000Z"
["finish_date"]=> string(24) "2017-04-11T13:55:41.000Z"
["created_date"]=> string(24) "2017-04-11T13:55:25.000Z"
["error_count"]=> int(50)
["contact_count"]=> int(1445)
}
But ActivityError::create() is expecting something like this:
array(10) {
["id"]=> string(36) "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
["type"]=> string(12) "ADD_CONTACTS"
["status"]=> string(8) "COMPLETE"
["errors"]=> array(2) {
[0]=> array(2) {
["line_number"]=> int(355)
["message"]=> string(13) "Invalid Email"
}
[1]=> array(2) {
["line_number"]=> int(1068)
["message"]=> string(13) "Invalid Email"
}
}
["file_name"]=> string(30) "default_list.txt"
["start_date"]=> string(24) "2017-04-11T13:55:30.000Z"
["finish_date"]=> string(24) "2017-04-11T13:55:41.000Z"
["created_date"]=> string(24) "2017-04-11T13:55:25.000Z"
["error_count"]=> int(50)
["contact_count"]=> int(1445)
}