These are the contents of $item in a ticket without custom fields:
object(stdClass)#110 (3) {
["id"]=>
string(1) "6"
["name"]=>
string(8) "Critical"
["color"]=>
string(7) "#FF0000"
}
In a ticket with custom fields, $item changes to
array(2) {
["title"]=>
string(16) "Telephone number"
["value"]=>
string(12) "0176xxxxxxxx"
}
object(stdClass)#110 (3) {
["id"]=>
string(1) "6"
["name"]=>
string(8) "Critical"
["color"]=>
string(7) "#FF0000"
}
In a ticket with custom fields, $item changes to
array(2) {
["title"]=>
string(16) "Telephone number"
["value"]=>
string(12) "0176xxxxxxxx"
}