diff --git a/CHANGELOG.md b/CHANGELOG.md index a7dca4d9..1ea1e3f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## CHANGE LOG +### v6.1.2 + +2013-09-24 issue [#40](https://github.com/qiniu/php-sdk/pull/40) + +- 解决与某些 PHP 框架不兼容问题(主要是全局变量的定义) +- 改善 `json_decode` 的错误提示(有可能 `json_last_error_msg` 函数不存在) + + ### v6.1.1 2013-07-04 issue [#24](https://github.com/qiniu/php-sdk/pull/24) diff --git a/qiniu/conf.php b/qiniu/conf.php index 986b91f9..254137a1 100644 --- a/qiniu/conf.php +++ b/qiniu/conf.php @@ -1,5 +1,12 @@ ($data, $error) if ($resp->ContentLength !== 0) { $data = json_decode($resp->Body, true); if ($data === null) { - $err = new Qiniu_Error(0, json_last_error_msg()); + $err_msg = function_exists('json_last_error_msg') ? json_last_error_msg() : "error with content:" . $resp->Body; + $err = new Qiniu_Error(0, $err_msg); return array(null, $err); } }