Fix PHP 5.3 "Fatal error: Using $this when not in object context"

This commit is contained in:
Zach Borboa
2015-10-27 22:00:05 -07:00
parent f0bc858897
commit 4e7f1d7ba8
+3 -3
View File
@@ -544,9 +544,9 @@ class Curl
public function setCookie($key, $value)
{
$this->cookies[$key] = $value;
$this->setOpt(CURLOPT_COOKIE, implode('; ', array_map(function($this, $name) {
return $name . '=' . str_replace(' ', '%20', $this->cookies[$name]);
}, array($this), array_keys($this->cookies))));
$this->setOpt(CURLOPT_COOKIE, implode('; ', array_map(function($k, $v) {
return $k . '=' . str_replace(' ', '%20', $v);
}, array_keys($this->cookies), array_values($this->cookies))));
}
/**