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

对于不能添加教练的bug #2

Closed
angela0 opened this issue May 20, 2014 · 5 comments
Closed

对于不能添加教练的bug #2

angela0 opened this issue May 20, 2014 · 5 comments
Assignees
Labels
Milestone

Comments

@angela0
Copy link

angela0 commented May 20, 2014

在增加和修改队员的函数中
$tmp = intval(I('post.group'));
if($tmp == 0 || $tmp == 1 || $tmp == 9) $data['group'] = $tmp;
else $tmp = 0;
这个代码这样写不能添加教练, 既然分组是通过下拉选项选择的,肯定只有0 1 2 9 这4个数,那$tmp不是只能有这几种可能吗,为什么不能直接写成 $data['group'] = $tmp; ?

@ekszz ekszz added bug and removed bug labels May 23, 2014
@ekszz ekszz self-assigned this May 23, 2014
@ekszz
Copy link
Owner

ekszz commented May 23, 2014

确认BUG,感谢反馈。
不过用户的输入是不确定的,并不能保证输入值为0 1 2 9,可以任意的,因此后台还是需要进行过滤。
这边漏掉了教练组,待修复。

@ekszz ekszz modified the milestone: Tofix May 23, 2014
@angela0
Copy link
Author

angela0 commented May 23, 2014

我对这段代码里面的
else $tmp = 0;
表示疑惑,这个是做什么用的

On 05/23/2014 08:36 PM, Ekszz wrote:

确认BUG,感谢反馈。
不过用户的输入是不确定的,并不能保证输入值为0 1 2 9,可以任意的,因此
后台还是需要进行过滤。
这边漏掉了教练组,待修复。


Reply to this email directly or view it on GitHub
#2 (comment).

@ekszz
Copy link
Owner

ekszz commented May 23, 2014

过滤用户输入的脏数据的。

@angela0
Copy link
Author

angela0 commented May 23, 2014

但是,$tmp这个变量以后没有再用,没有这个操作应该这是可以的吧

On 05/23/2014 10:25 PM, Ekszz wrote:

过滤用户输入的脏数据的。


Reply to this email directly or view it on GitHub
#2 (comment).

@ekszz
Copy link
Owner

ekszz commented Jun 22, 2014

这个应该是BUG,应该为$data['group'] = 0,已提交修复代码。

@ekszz ekszz modified the milestones: Fixed, Tofix Jun 22, 2014
@ekszz ekszz closed this as completed Jun 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants