Merge pull request #138 from zachborboa/master

Fix "Undefined index" errors
This commit is contained in:
Zach Borboa
2015-02-15 00:45:55 +07:00
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
"name": "Zach Borboa"
}
],
"version": "3.0.1",
"version": "3.0.2",
"require": {
"php": ">=5.3",
"ext-curl": "*"
+1 -1
View File
@@ -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();
+5 -3
View File
@@ -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;
}