mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-09 09:56:27 +00:00
Merge pull request #138 from zachborboa/master
Fix "Undefined index" errors
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
"name": "Zach Borboa"
|
||||
}
|
||||
],
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"ext-curl": "*"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ namespace Curl;
|
||||
|
||||
class Curl
|
||||
{
|
||||
const VERSION = '3.0.1';
|
||||
const VERSION = '3.0.2';
|
||||
const DEFAULT_TIMEOUT = 30;
|
||||
|
||||
private $cookies = array();
|
||||
|
||||
@@ -188,6 +188,8 @@ $data_mapping = array(
|
||||
'server' => '_SERVER',
|
||||
);
|
||||
|
||||
$data = $$data_mapping[$test];
|
||||
$value = isset($data[$key]) ? $data[$key] : '';
|
||||
echo $value;
|
||||
if (!empty($test)) {
|
||||
$data = $$data_mapping[$test];
|
||||
$value = isset($data[$key]) ? $data[$key] : '';
|
||||
echo $value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user