BambooHR/bhr-api-php — pull request #4 by Warbo (2014-09-19 12:40:00+00:00)
Title: Don't assume we got an error message

Calling the Bamboo API without an Internet connection results in objects like this:

O:31:"BambooHR\API\BambooHTTPResponse":3:{s:10:"statusCode";i:0;s:7:"headers";a:0:{}s:7:"content";s:16:"Connection error";}

Calling getErrorMessage on this (in our case, to log the error) causes "Undefined index: X-BambooHR-Error-Messsage", since that header isn't set. This change prevents that error and returns a useful message instead.