mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-04 23:06:53 +00:00
Fix "Array to string conversion/Undefined variable" error in PHP 7
This commit is contained in:
@@ -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