From 973de50b1bce065a8a9e1baa81b9cdfd920867a7 Mon Sep 17 00:00:00 2001
From: peichao <380692952@qq.com>
Date: Wed, 24 Jul 2013 01:57:20 +0800
Subject: [PATCH 1/6] fix conf.php bug
---
qiniu/conf.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/qiniu/conf.php b/qiniu/conf.php
index 986b91f9..a3cfd81c 100644
--- a/qiniu/conf.php
+++ b/qiniu/conf.php
@@ -1,4 +1,15 @@
我在使用的时候无法在其他php文件的函数中使用此页的这几个变量。因为我非主职PHP的,经查证,全局变量使用前需要前声明才行。
+ * 如此这般之后,我就可以正常的按照php-sdk-doc 的指南来正常使用了。
+ * 先提交,望大家审核。
+ */
+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';
From ed52aa0a639a89798d28f1ee137002ea60342444 Mon Sep 17 00:00:00 2001
From: peichao <380692952@qq.com>
Date: Wed, 24 Jul 2013 01:59:30 +0800
Subject: [PATCH 2/6] fix email in commit...
---
qiniu/conf.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qiniu/conf.php b/qiniu/conf.php
index a3cfd81c..fa50b165 100644
--- a/qiniu/conf.php
+++ b/qiniu/conf.php
@@ -1,6 +1,6 @@
我在使用的时候无法在其他php文件的函数中使用此页的这几个变量。因为我非主职PHP的,经查证,全局变量使用前需要前声明才行。
+ *
我在使用的时候无法在其他php文件的函数中使用此页的这几个变量。因为我非主职PHP的,经查证,全局变量使用前需要前声明才行。
* 如此这般之后,我就可以正常的按照php-sdk-doc 的指南来正常使用了。
* 先提交,望大家审核。
*/
From 8482cb5e96127097058e0b829b1e8eec249126e8 Mon Sep 17 00:00:00 2001
From: dtynn
Date: Thu, 22 Aug 2013 13:37:59 +0800
Subject: [PATCH 3/6] json_last_error_msg
---
qiniu/http.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qiniu/http.php b/qiniu/http.php
index ec17de03..a323a0fb 100644
--- a/qiniu/http.php
+++ b/qiniu/http.php
@@ -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);
}
}
From 91512f9e882892ff275d6893600e715cf28eb6cd Mon Sep 17 00:00:00 2001
From: dtynn
Date: Thu, 22 Aug 2013 13:49:46 +0800
Subject: [PATCH 4/6] retab
---
qiniu/http.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qiniu/http.php b/qiniu/http.php
index a323a0fb..b3dece96 100644
--- a/qiniu/http.php
+++ b/qiniu/http.php
@@ -182,7 +182,7 @@ function Qiniu_Client_ret($resp) // => ($data, $error)
if ($resp->ContentLength !== 0) {
$data = json_decode($resp->Body, true);
if ($data === null) {
- $err_msg = function_exists('json_last_error_msg') ? json_last_error_msg() : "error with content:" . $resp->Body;
+ $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);
}
From f4a7818b47d346a1557d22e88a67194d1f667fb4 Mon Sep 17 00:00:00 2001
From: xushiwei
Date: Tue, 24 Sep 2013 19:29:41 +0800
Subject: [PATCH 5/6] Update conf.php
---
qiniu/conf.php | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/qiniu/conf.php b/qiniu/conf.php
index fa50b165..254137a1 100644
--- a/qiniu/conf.php
+++ b/qiniu/conf.php
@@ -1,9 +1,5 @@
我在使用的时候无法在其他php文件的函数中使用此页的这几个变量。因为我非主职PHP的,经查证,全局变量使用前需要前声明才行。
- * 如此这般之后,我就可以正常的按照php-sdk-doc 的指南来正常使用了。
- * 先提交,望大家审核。
- */
+
global $QINIU_UP_HOST;
global $QINIU_RS_HOST;
global $QINIU_RSF_HOST;
From 452cecdb8774bade96db6bc394ee0b0fc88d205b Mon Sep 17 00:00:00 2001
From: xushiwei
Date: Tue, 24 Sep 2013 19:33:50 +0800
Subject: [PATCH 6/6] Update CHANGELOG.md
---
CHANGELOG.md | 8 ++++++++
1 file changed, 8 insertions(+)
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)