ccfd-api-php icon indicating copy to clipboard operation
ccfd-api-php copied to clipboard

Undefined Offset 1 minfraud/http/src/HTTPBase.php:408

Open zerocarbthirty opened this issue 5 years ago • 4 comments

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?

zerocarbthirty avatar Sep 25 '19 14:09 zerocarbthirty

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.

oschwald avatar Sep 25 '19 15:09 oschwald

Sure I will do that, but you may want to add a check to make sure that $keyValuePairs isn't NULL, false, or empty.

zerocarbthirty avatar Sep 26 '19 17:09 zerocarbthirty

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.

horgh avatar Sep 26 '19 19:09 horgh

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.

oschwald avatar Sep 26 '19 20:09 oschwald