Closed funkytaco closed 9 years ago
The exception points to this line: https://github.com/chriso/klein.php/blob/master/src/Klein/AbstractResponse.php#L382
I'm using the example from this page (as a Composer package): https://github.com/hipchat/hipchat-php
$token = '<your api token>'; $hc = new HipChat\HipChat($token); // list rooms foreach ($hc->get_rooms() as $room) { $arrRooms[] = ['id' => $room->room_id, 'name' => $room->name]; }
and I'm returning the array.
Interesting - If I print_r($hipchatModule->get_rooms()); to the page via Klein, it works fine.
print_r($hipchatModule->get_rooms());
I think this is a problem with PHP's foreach() copying the array, unrelated to Klein.
The exception points to this line: https://github.com/chriso/klein.php/blob/master/src/Klein/AbstractResponse.php#L382
I'm using the example from this page (as a Composer package): https://github.com/hipchat/hipchat-php
and I'm returning the array.