Fix: add getApiError() method
This commit is contained in:
parent
dec582843b
commit
640f2e4c22
@ -763,4 +763,26 @@ function deformatNVP($nvpstr)
|
||||
return $nvpArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get API errors
|
||||
*/
|
||||
function getApiError()
|
||||
{
|
||||
$errors=array();
|
||||
|
||||
$resArray=$_SESSION['reshash'];
|
||||
|
||||
if(isset($_SESSION['curl_error_no']))
|
||||
{
|
||||
$errors[] = $_SESSION['curl_error_no'].'-'.$_SESSION['curl_error_msg'];
|
||||
}
|
||||
|
||||
foreach($resArray as $key => $value)
|
||||
{
|
||||
$errors[] = $key.'-'.$value;
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user