Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v6.1.2 #40

Merged
merged 8 commits into from
Sep 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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