Skip to content

Commit 8482cb5

Browse files
author
dtynn
committed
json_last_error_msg
1 parent d681127 commit 8482cb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qiniu/http.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ function Qiniu_Client_ret($resp) // => ($data, $error)
182182
if ($resp->ContentLength !== 0) {
183183
$data = json_decode($resp->Body, true);
184184
if ($data === null) {
185-
$err = new Qiniu_Error(0, json_last_error_msg());
185+
$err_msg = function_exists('json_last_error_msg') ? json_last_error_msg() : "error with content:" . $resp->Body;
186+
$err = new Qiniu_Error(0, $err_msg);
186187
return array(null, $err);
187188
}
188189
}

0 commit comments

Comments
 (0)