You are here

function _eloqua_set_curl_get_error in Eloqua 6

Same name and namespace in other branches
  1. 7 eloqua_webform/eloqua_webform.cron.inc \_eloqua_set_curl_get_error()

Returns the cURL error for a status returned from eloqua_curl_set_opts @TODO: Theme

Parameters

$status array:

Return value

string Html formatted message

1 call to _eloqua_set_curl_get_error()
_eloqua_cron_get_curl_resource in ./eloqua.cron.inc
Returns a configured Curl Resource for use

File

./eloqua.cron.inc, line 240

Code

function _eloqua_set_curl_get_error($status) {
  if (!is_array($status)) {
    return FALSE;
  }
  $messages = array();
  $message = '';
  foreach ($status as $key => $data) {
    if ($data['status']) {
      continue;
    }
    $value = var_export($data['value'], TRUE);
    $messages[] = "<li>{$key} - Error: {$data['message']}<br /> Value: {$value}</li>";
  }
  if (!empty($messages)) {
    $message = '<ul>' . implode("\n", $messages) . '</ul>';
  }
  return $message;
}