php_errormsg is deprecated
parent
1e0c39c632
commit
fe71a9abaa
|
@ -2459,11 +2459,13 @@ function do_post_request($url, $data, $optional_headers = null) {
|
|||
$ctx = stream_context_create($params);
|
||||
$fp = @fopen($url, 'rb', false, $ctx);
|
||||
if ( !$fp ) {
|
||||
throw new Exception("Problem with $url, $php_errormsg");
|
||||
throw new Exception("Problem with $url, "
|
||||
.print_r(error_get_last(),true));
|
||||
}
|
||||
$response = @stream_get_contents($fp);
|
||||
if ( $response === false ) {
|
||||
throw new Exception("Problem reading data from $url, $php_errormsg");
|
||||
throw new Exception("Problem reading data from $url, data: ".print_r($params,true)
|
||||
.print_r(error_get_last(),true));
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue