Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -38,11 +38,7 @@ class _Response
|
||||
{
|
||||
if ( $data )
|
||||
{
|
||||
foreach ( explode( ';', $data ) as $row )
|
||||
{
|
||||
$exploded = explode( '=', $row );
|
||||
$this->data[ $exploded[0] ] = $exploded[1];
|
||||
}
|
||||
$this->data = json_decode( $data, true );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +94,7 @@ class _Response
|
||||
* @brief minFraud error codes
|
||||
* @see https://dev.maxmind.com/minfraud/#Error_Reporting
|
||||
*/
|
||||
protected static $responseErrors = array( 'INVALID_LICENSE_KEY', 'IP_REQUIRED', 'IP_NOT_FOUND ', 'MAX_REQUESTS_REACHED', 'LICENSE_REQUIRED ');
|
||||
protected static array $responseErrors = array( 'JSON_INVALID', 'REQUEST_INVALID', 'AUTHORIZATION_INVALID', 'ACCOUNT_ID_REQUIRED', 'LICENSE_KEY_REQUIRED', 'INSUFFICIENT_FUNDS', 'PERMISSION_REQUIRED' );
|
||||
|
||||
/**
|
||||
* Does the response include an error?
|
||||
@@ -107,7 +103,7 @@ class _Response
|
||||
*/
|
||||
public function error()
|
||||
{
|
||||
if ( $this->err AND \in_array($this->err, static::$responseErrors ) )
|
||||
if ( $this->error AND \in_array( $this->code, static::$responseErrors ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -121,7 +117,7 @@ class _Response
|
||||
*/
|
||||
public function warning()
|
||||
{
|
||||
if ( $this->err AND !\in_array($this->err, static::$responseErrors ) )
|
||||
if ( $this->error AND !\in_array($this->code, static::$responseErrors ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user