utf8ize
This commit is contained in:
parent
7d388f9cbe
commit
b33ec1da0e
@ -478,7 +478,7 @@ trait UpdateHandler
|
|||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_URL, $this->hook_url);
|
curl_setopt($ch, CURLOPT_URL, $this->hook_url);
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($update));
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($this->utf8ize($update)));
|
||||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||||
$parse = parse_url($this->hook_url);
|
$parse = parse_url($this->hook_url);
|
||||||
if (isset($parse['scheme']) && $parse['scheme'] == 'https') {
|
if (isset($parse['scheme']) && $parse['scheme'] == 'https') {
|
||||||
|
@ -48,4 +48,16 @@ trait Tools
|
|||||||
|
|
||||||
return $handle;
|
return $handle;
|
||||||
}
|
}
|
||||||
|
public function utf8ize($d)
|
||||||
|
{
|
||||||
|
if (is_array($d)) {
|
||||||
|
foreach ($d as $k => $v) {
|
||||||
|
$d[$k] = $this->utf8ize($v);
|
||||||
|
}
|
||||||
|
} elseif (is_string($d)) {
|
||||||
|
return utf8_encode($d);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $d;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user