Update Curl.php

More rigorous comparison
This commit is contained in:
Chengke Sun
2016-05-11 20:41:46 +08:00
parent 1fbf55d15f
commit 46a7694b79
+1 -1
View File
@@ -708,7 +708,7 @@ class Curl
{
if(preg_match_all('/\s*([^;=]+)=([^;]+)/i',$string,$matches) > 0){
if(isset($matches[1]) && isset($matches[2])){
if(count($matches[1]) == count($matches[2])){
if(count($matches[1]) === count($matches[2])){
foreach ($matches[1] as $handle => $key) {
$this->setCookie($key, $matches[2][$handle]);
}