added error message
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
Chris 2023-10-27 12:13:19 +02:00
parent 757dca8bf5
commit ef760f0c8e

View File

@ -231,7 +231,10 @@ function pictshareUploadImage($path,$hash=false)
// output the response
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$json = json_decode(curl_exec($request).PHP_EOL,true);
$answer = curl_exec($request);
if($answer === false) return ['status'=>'error','error'=>curl_error($request)];
else
$json = json_decode($answer.PHP_EOL,true);
// close the session
curl_close($request);