chok/OAuthBase — Issue #3: no error checking for curl_exec()
Author: battika
Created: 2011-12-02 08:00:06+00:00
State: open

Hello Maxime,

I spent some days with getting sfMelodyPlugin work in my Windows development environment and one thing I found was in sfOAuth.class.php there was no error checking implemented for curl_exec() so there was no indication whether curl had run okay or it had failed with some problem.

What I mean is, instead of using

$response = curl_exec($ci);

it might be better idea to implement some kind of error checking like:

if ( ! $response = curl_exec($ci))
{
// Log an error here using the output of curl_error($ci);
}

I contributed a possible way of logging the error here if you want to have a look: https://github.com/battika/OAuthBase

Thank you for your great job in the Symfony OAuth area, it's very much appreciated.