Merge pull request #386 from zachborboa/updates

Add PHP 7.1 to continuous integration tests
This commit is contained in:
Zach Borboa
2016-09-02 00:25:16 -07:00
committed by GitHub
3 changed files with 31 additions and 1 deletions
+2
View File
@@ -6,11 +6,13 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
- nightly
matrix:
allow_failures:
- php: 7.1
- php: nightly
before_script:
+25
View File
@@ -0,0 +1,25 @@
<?php
require __DIR__ . '/vendor/autoload.php';
use \Curl\MultiCurl;
$multi_curl = new MultiCurl();
// HINT: If API documentation refers to using something like curl -F "myimage=image.png",
// curl --form "myimage=image.png", or the html form is similar to <form enctype="multipart/form-data" method="post">,
// then try uncommenting the following line:
// $multi_curl->setHeader('Content-Type', 'multipart/form-data');
$multi_curl->addPost('https://httpbin.org/post', array(
'image' => new CURLFile('the-lorax.jpg'),
));
$multi_curl->addPost('https://httpbin.org/post', array(
'image' => new CURLFile('swomee-swans.jpg'),
));
$multi_curl->addPost('https://httpbin.org/post', array(
'image' => new CURLFile('truffula-trees.jpg'),
));
$multi_curl->start();
+4 -1
View File
@@ -350,7 +350,10 @@ class Curl
// Include additional error code information in error message when possible.
if ($this->curlError && function_exists('curl_strerror')) {
$this->curlErrorMessage = curl_strerror($this->curlErrorCode) . ': ' . $this->curlErrorMessage;
$this->curlErrorMessage =
curl_strerror($this->curlErrorCode) . (
empty($this->curlErrorMessage) ? '' : ': ' . $this->curlErrorMessage
);
}
$this->httpStatusCode = $this->getInfo(CURLINFO_HTTP_CODE);