Skip to content

Commit

Permalink
一处逻辑验证bug
Browse files Browse the repository at this point in the history
  • Loading branch information
assimon committed Jun 30, 2018
1 parent 57baf39 commit 74ac530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controller/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function postOrder()
if($post['gid'] =="" || intval($post['number']) <=0 || $post['account'] == ""){
resMsg(0,null,'充值账号、数量、商品不能为空,请仔细填写');
}
if(!is_int($post['number'])){
if(!is_numeric($post['number'])){
resMsg(0,null,'商品数量请填写整数!');
}
$goods = $this->model()->select()->from('goods')->where(array('fields' => 'id=?', 'values' => array($post['gid'])))->fetchRow();
Expand Down

0 comments on commit 74ac530

Please sign in to comment.