Skip to content

Commit 812c4e0

Browse files
committed
Merge pull request #40 from qiniu/develop
Release v6.1.2
2 parents f1235d9 + 452cecd commit 812c4e0

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## CHANGE LOG
22

3+
### v6.1.2
4+
5+
2013-09-24 issue [#40](https://github.com/qiniu/php-sdk/pull/40)
6+
7+
- 解决与某些 PHP 框架不兼容问题(主要是全局变量的定义)
8+
- 改善 `json_decode` 的错误提示(有可能 `json_last_error_msg` 函数不存在)
9+
10+
311
### v6.1.1
412

513
2013-07-04 issue [#24](https://github.com/qiniu/php-sdk/pull/24)

qiniu/conf.php

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?php
22

3+
global $QINIU_UP_HOST;
4+
global $QINIU_RS_HOST;
5+
global $QINIU_RSF_HOST;
6+
7+
global $QINIU_ACCESS_KEY;
8+
global $QINIU_SECRET_KEY;
9+
310
$QINIU_UP_HOST = 'http://up.qiniu.com';
411
$QINIU_RS_HOST = 'http://rs.qbox.me';
512
$QINIU_RSF_HOST = 'http://rsf.qbox.me';

qiniu/http.php

+2-1
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)