ccfd-api-php
ccfd-api-php copied to clipboard
Undefined Offset 1 minfraud/http/src/HTTPBase.php:408
Hi,
When using the API with our minfraud account we do this:
$ccfs->query();
and randomly, sometimes this happens:
Undefined offset: 1
The full trace is pointing to this:
list($key, $value) = explode('=', $keyValuePairs[$i]);
Anyone have any idea what would cause $keyValuePairs to be empty and is there a different way we should be calling query(); so that it returns a useful error?
Please contact [email protected] with your account ID and the approximate times associated with these requests. With this information, we can look into this a bit more.
Sure I will do that, but you may want to add a check to make sure that $keyValuePairs isn't NULL, false, or empty.
Yeah, it looks like we need to check the response more carefully. It looks like what happened here was we sent an HTTP error (HTTP 403) and the client doesn't handle that well. The 403 was because of our planned disruption for TLS (see https://dev.maxmind.com/minfraud/release-notes/) I think.
That said, I would strongly encourage you to consider upgrading to our new minFraud API. That API has much better error checking and receives active updates.