Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[BUG] cp_credit.php第71行

[复制链接]
landso 发表于 2009-12-11 01:36:55 | 显示全部楼层 |阅读模式
本帖最后由 landso 于 2009-12-11 03:38 编辑

大致是71行吧,看代码:
  1. list($toappid, $tocredits) = explode('|', $tocredits);
  2. $ucresult = uc_credit_exchange_request($_SGLOBAL['supe_uid'], $_CACHE['creditsettings'][$tocredits]['creditsrc'], $tocredits, $toappid, $netamount);
复制代码
第二个参数$_CACHE['creditsettings'][$tocredits]['creditsrc']
根据积分兑换设置,$_CACHE['creditsettings']的key是这样格式的:目标应用ID|目标积分ID
所以$tocredits应该是这个格式才对

但是,上面一行list($toappid, $tocredits) = explode('|', $tocredits);
可以看到$tocredits已经变成目标积分ID了

那么,uc_credit_exchange_request() 的第二个参数就错了

不知这是BUG还是我理解错误,欢迎拍砖。。。


另外遇到一个奇妙的问题,即使我关闭了目标应用的积分兑换开关,甚至在UC.PHP里直接返回负值,uc_credit_exchange_request()返回的结果都是1。。已确定参数都对,谁遇到过这样的问题?(问题原因已找到,见https://discuz.dismall.com/thread-1511093-1-1.html)
 楼主| landso 发表于 2010-1-14 05:03:05 | 显示全部楼层
没人关注么  这个我我理解错误还是BUG呢?  请斑竹看下
回复

使用道具 举报

幸福摩天轮 发表于 2010-1-14 12:28:54 | 显示全部楼层
假设:$tocredits="2222|3333";
那么 
list($toappid, $tocredits) = explode('|', $tocredits);
后:
$toappid = 2222;
$tocredits  =3333;

$_CACHE['creditsettings'][$tocredits]['creditsrc']

其实是 $_CACHE['creditsettings'][3333]['creditsrc'] 了。应该是这样吧。
回复

使用道具 举报

 楼主| landso 发表于 2010-2-1 01:45:01 | 显示全部楼层
但期望应该是$_CACHE['creditsettings']['2222|3333']['creditsrc']
不是么
回复

使用道具 举报

网维 发表于 2010-11-16 00:44:49 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| landso 发表于 2013-4-4 01:16:04 | 显示全部楼层
这个问题有别的用户也提出了 不知道开发组是否注意到并更新?
回复

使用道具 举报

 楼主| landso 发表于 2013-4-4 01:17:17 | 显示全部楼层
https://discuz.dismall.com/forum. ... ead&tid=2643998
uchome向其它系统兑换积分失败的方法
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-4-26 05:07 , Processed in 0.199747 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表