xp-framework/xp-framework — Issue #109: Errors in CurlHttpTransport
Author: ppetermann
Created: 2012-01-16 15:25:20+00:00
State: open

# Errors in CurlHttpTransport
using
https://github.com/xp-framework/xp-framework/blob/master/core/src/main/php/peer/http/CurlHttpTransport.class.php
i discoverd two errors

## error 1 - using wrong variable for curl_setopt
in the constructor the resource handle is put to $this->handle,
however the setopt thats executed for specific $arg, it tries to use $curl,
which does not exist
Line: 32

## error 2 - error handling on closed handle
curl_error/curl_errno require a resource handle,
the one used during creation of the exception however is closed,
closed handles are deleted, thus not valid for error handling
Lines: 56..60