mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 11:09:26 +00:00
Merge pull request #282 from zachborboa/php70
Add php 7 to continuous integration tests
This commit is contained in:
@@ -5,11 +5,13 @@ php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- hhvm
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: nightly
|
||||
|
||||
before_script:
|
||||
|
||||
+3
-1
@@ -544,7 +544,9 @@ class Curl
|
||||
if (empty($this->options[CURLOPT_INFILE]) && empty($this->options[CURLOPT_INFILESIZE])) {
|
||||
$this->setHeader('Content-Length', strlen($put_data));
|
||||
}
|
||||
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
|
||||
if (!empty($put_data)) {
|
||||
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
|
||||
}
|
||||
return $this->exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -248,17 +248,17 @@ if ($test == 'http_basic_auth') {
|
||||
header('Content-Type: text/plain');
|
||||
|
||||
$data_mapping = array(
|
||||
'cookie' => '_COOKIE',
|
||||
'delete' => '_GET',
|
||||
'get' => '_GET',
|
||||
'patch' => '_PATCH',
|
||||
'post' => '_POST',
|
||||
'put' => '_PUT',
|
||||
'server' => '_SERVER',
|
||||
'cookie' => $_COOKIE,
|
||||
'delete' => $_GET,
|
||||
'get' => $_GET,
|
||||
'patch' => $_PATCH,
|
||||
'post' => $_POST,
|
||||
'put' => $_PUT,
|
||||
'server' => $_SERVER,
|
||||
);
|
||||
|
||||
if (!empty($test)) {
|
||||
$data = $$data_mapping[$test];
|
||||
$data = $data_mapping[$test];
|
||||
$value = isset($data[$key]) ? $data[$key] : '';
|
||||
echo $value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user