Skip to content

Commit

Permalink
Merge pull request #40 from qiniu/develop
Browse files Browse the repository at this point in the history
Release v6.1.2
  • Loading branch information
xushiwei committed Sep 24, 2013
2 parents f1235d9 + 452cecd commit 812c4e0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 7 additions & 0 deletions qiniu/conf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

global $QINIU_UP_HOST;
global $QINIU_RS_HOST;
global $QINIU_RSF_HOST;

global $QINIU_ACCESS_KEY;
global $QINIU_SECRET_KEY;

$QINIU_UP_HOST = 'http://up.qiniu.com';
$QINIU_RS_HOST = 'http://rs.qbox.me';
$QINIU_RSF_HOST = 'http://rsf.qbox.me';
Expand Down
3 changes: 2 additions & 1 deletion qiniu/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ function Qiniu_Client_ret($resp) // => ($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);
}
}
Expand Down

0 comments on commit 812c4e0

Please sign in to comment.