Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteLRS::sendRequest generates undefined variable warnings if the host cannot be reached #62

Closed
jamarr81 opened this issue Jun 21, 2016 · 0 comments
Assignees

Comments

@jamarr81
Copy link

jamarr81 commented Jun 21, 2016

If you instantiate a RemoteLRS object and the LRS host is down, or the URL points to a non-LRS endpoint, etc. and then try to send a statement via RemoteLRS::saveStatement a couple of 'Notice: Undefined variable' exceptions are generated.

One for $fp on line 149. This is because $fp is (currently) only defined within the preceeding try block, and if an exception is generated here, then $fp goes undefined.

The other is for $response on line 182. This is because $response is only defined within the block that checks for $fp being truthy (mentioned above).

changset d634afb seems to have introduced these problems.

@jamarr81 jamarr81 changed the title RemoteLRS::sendRequest generates undefined variable warnings for non-xAPI host RemoteLRS::sendRequest generates undefined variable warnings if the host cannot be reached Jun 29, 2016
@brianjmiller brianjmiller self-assigned this Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants