diff --git a/README.md b/README.md index b04339a81..b0effb7e1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,16 @@ require 'vendor/autoload.php'; And you're ready to go! +Alternatively, if you would like to clone the repository into a directory (to work and submit pull requests): + +```bash +git clone git@github.com:rackspace/php-opencloud.git . +curl -sS https://getcomposer.org/installer | php +php composer.phar install +``` + +You can specify the `--no-dev` flag to Composer if you do not want to install phpDocumentor (lots of vendor folders). + Support and Feedback -------------------- Your feedback is appreciated! If you have specific problems or bugs with this SDK, please file an issue on Github. We diff --git a/lib/OpenCloud/Common/Http/Message/RequestSubscriber.php b/lib/OpenCloud/Common/Http/Message/RequestSubscriber.php index c699f2c53..7c5407fbe 100644 --- a/lib/OpenCloud/Common/Http/Message/RequestSubscriber.php +++ b/lib/OpenCloud/Common/Http/Message/RequestSubscriber.php @@ -39,8 +39,9 @@ public static function getSubscribedEvents() */ public function doCurlProgress($options) { - if ($options['request']->getCurlOptions()->hasKey('progressCallback')) { - return call_user_func($options['request']->getCurlOptions()->get('progressCallback')); + $curlOptions = $options['request']->getCurlOptions(); + if ($curlOptions->hasKey('progressCallback')) { + return call_user_func($curlOptions->get('progressCallback')); } else { echo sprintf( "Download size: [%d]\nDownloaded: [%d]\nUpload size: [%d]\nUploaded: [%d]\n",