public function CurlHandle::getStderr

Get the stderr output

Parameters

bool $asResource Set to TRUE to get an fopen resource:

Return value

string|resource|null

1 call to CurlHandle::getStderr()
CurlHandle::updateRequestFromTransfer in drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlHandle.php
Update a request based on the log messages of the CurlHandle

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Curl/CurlHandle.php, line 346

Class

CurlHandle
Immutable wrapper for a cURL handle

Namespace

Guzzle\Http\Curl

Code

public function getStderr($asResource = false) {
  $stderr = $this
    ->getOptions()
    ->get(CURLOPT_STDERR);
  if (!$stderr) {
    return null;
  }
  if ($asResource) {
    return $stderr;
  }
  fseek($stderr, 0);
  $e = stream_get_contents($stderr);
  fseek($stderr, 0, SEEK_END);
  return $e;
}