Fixed PHP errors when the API key was incorrect.