Changed $result to array

This commit is contained in:
TimZ99 2020-01-09 22:26:03 +01:00
parent 8edd04a1a7
commit ef3970cda9
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
1 changed files with 5 additions and 2 deletions

View File

@ -390,7 +390,7 @@ namespace {
* @param string|bool $website_password Password website
* @param string|null $request_method Request method like GET, POST etc.
* @param string|null $post_field POST data
* @return string cURL result
* @return array cURL result
*/
function psm_curl_get(
$href,
@ -418,6 +418,7 @@ namespace {
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_CERTINFO, 1);
if (!empty($request_method)) {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request_method);
@ -455,7 +456,9 @@ namespace {
PSM_VERSION . '; +https://github.com/phpservermon/phpservermon)');
}
$result = curl_exec($ch);
$result['exec'] = curl_exec($ch);
$result['info'] = curl_getinfo($ch);
curl_close($ch);
if (defined('PSM_DEBUG') && PSM_DEBUG === true && psm_is_cli()) {