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

后台功能”全局-积分设置-积分转换“以及”积分充值“错误 #99

Closed
Sefank opened this issue Mar 5, 2017 · 4 comments

Comments

@Sefank
Copy link

Sefank commented Mar 5, 2017

这里给出”全局-积分设置-积分转换“的错误信息:

Uncaught error with message 'E_WARNING: Invalid argument supplied for foreach()'
D:\phpStudy\WWW\data\compile\template\credit\admin\credit_exchange.tpl: 57

52: <td>启用</td>
53: <td>操作</td>
54: </tr>
55: </thead>
56: <tbody>
57: <?php foreach ($exchange as $key => $value) { ?>
58: <tr>
59: <td><?php echo htmlspecialchars($value['value1'], ENT_QUOTES, 'UTF-8');?>个<?php echo htmlspecialchars($creditBo->cType[$value['credit1']], ENT_QUOTES, 'UTF-8');?></td>
60: <td>兑换</td>
61: <td><?php echo htmlspecialchars($value['value2'], ENT_QUOTES, 'UTF-8');?>个<?php echo htmlspecialchars($creditBo->cType[$value['credit2']], ENT_QUOTES, 'UTF-8');?></td>
__Stack:

#12 D:\phpStudy\WWW\vendor\medz\windframework\wind\base\AbstractWindFrontController.php (262)
#11 D:\phpStudy\WWW\data\compile\template\credit\admin\credit_exchange.tpl (57) _errorHandle(2,"Invalid argument supplied for foreach()","D:\phpStudy\WWW\data\compile\template\credit\admin\credit_exchan…",57,array( '__tpl' => 'D:\phpStudy\WWW\data\compile/template/credit/admin/credit_exchange.tpl', '__vars' => array( 'loginUser' => NULL, 'creditBo' => NULL, 'exchange' => '', 'currentTabs' => array( 'run' => '', 'strategy' => '', 'recharge' => '', 'exchange' => 'current', 'transfer' => '', 'log' => '', ), ), '__viewer' => NULL, 'loginUser' => NULL, 'creditBo' => NULL, 'exchange' => '', 'currentTabs' => array( 'run' => '', 'strategy' => '', 'recharge' => '', 'exchange' => 'current', 'transfer' => '', 'log' => '', ), ))
#10 D:\phpStudy\WWW\vendor\medz\windframework\wind\viewer\IWindViewerResolver.php (57) include("D:\phpStudy\WWW\data\compile\template\credit\admin\credit_exchan…")
#9 D:\phpStudy\WWW\vendor\medz\windframework\wind\viewer\resolver\WindViewerResolver.php (43) render("D:\phpStudy\WWW\data\compile/template/credit/admin/credit_exchan…",array( 'loginUser' => NULL, 'creditBo' => NULL, 'exchange' => '', 'currentTabs' => array( 'run' => '', 'strategy' => '', 'recharge' => '', 'exchange' => 'current', 'transfer' => '', 'log' => '', ), ),WindViewerResolver)
#8 D:\phpStudy\WWW\vendor\medz\windframework\wind\viewer\WindView.php (152) windFetch()
#7 D:\phpStudy\WWW\vendor\medz\windframework\wind\web\WindDispatcher.php (44) render(false)
#6 D:\phpStudy\WWW\vendor\medz\windframework\wind\web\WindWebApplication.php (32) dispatch(WindForward,WindRouter,false)
#5 D:\phpStudy\WWW\vendor\medz\windframework\wind\base\AbstractWindApplication.php (95) doDispatch(WindForward)
#4 D:\phpStudy\WWW\vendor\medz\windframework\wind\base\AbstractWindFrontController.php (217) run(WindRouter)
#3 D:\phpStudy\WWW\vendor\medz\windframework\wind\web\WindWebFrontController.php (23) run()
#2 D:\phpStudy\WWW\src\Wekit.php (41) run()
#1 D:\phpStudy\WWW\admin.php (11) run("pwadmin",array( 'router' => array( 'config' => array( 'module' => array( 'default-value' => 'default', ), 'routes' => array( 'admin' => array( 'class' => 'LIB:route.PwAdminRoute', 'default' => true, ), ), ), ), ))

@medz
Copy link
Owner

medz commented Mar 5, 2017 via email

medz added a commit that referenced this issue Mar 8, 2017
修复方案:获取的数据强制转换为数组。
@medz
Copy link
Owner

medz commented Mar 8, 2017

@Sefank 已经修复~

@medz medz closed this as completed Mar 8, 2017
@Sefank
Copy link
Author

Sefank commented Mar 10, 2017

Good job~

@medz
Copy link
Owner

medz commented Mar 11, 2017

@Sefank Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants