Score
0
Watch 212 Star 665 Fork 227

GVPsentcms管理系统 / sentcmsPHP

http://localhost/index.php/admin/category/index/model_id/1.html

Closed
liveup  Opened this issue

本地测试,在栏目里面看模型数据会出错

未定义变量: data
 		$this->formatTree = array();
 		$this->_toFormatTree($list);
		foreach ($this->formatTree as $key => $value) {
			$index = ($key+1);
 			$next_parentid = isset($this->formatTree[$index][$pid]) ? $this->formatTree[$index][$pid] : '';
 			$value['level_show'] = $this->cat_empty_deal($value, $next_parentid);
 			$value['title_show'] = $value['level_show'].$value[$title];
 			$data[] = $value;
 		}
 		return $data;
 	}
 }
 Call Stack
 in Tree.php line 93
 at Error::appError(8, 'Undefined variable: ...', 'G:\phpStudy\WWW\core...', 93, ['list' => [], 'title' => 'title', 'pk' => 'id', ...]) in Tree.php line 93
 at Tree->toFormatTree([['id' => 3, 'name' => '', 'title' => '国外新闻', ...]]) in Category.php line 29
 at Category->index('1')
 at ReflectionMethod->invokeArgs(object(Category), ['1']) in App.php line 196
 at App::invokeMethod([object(Category), 'index'], []) in App.php line 408
 at App::module(['admin', 'category', 'index'], ['app_host' => '', 'app_debug' => '0', 'app_trace' => false, ...], null) in App.php line 295
 at App::exec(['type' => 'module', 'module' => ['admin', 'category', 'index']], ['app_host' => '', 'app_debug' => '0', 'app_trace' => false, ...]) in App.php line 123
 at App::run() in start.php line 18
 at require('G:\phpStudy\WWW\core...') in index.php line 34
185 ycgpp 1578913743 total 2 participants

Comments (2)

185 ycgpp 1578913743
腾速科技 2017-10-10 09:14 owner

未发现此问题,请更新到最新版本,数据库有变动
输入图片说明

liveup 2017-10-10 21:41

哦。我知道了。。我自己弄了文章和新闻两个模型。而且栏目1(文章)-》栏目二(新闻)。结果这样就导致新闻出错了。

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
PHP
1
https://gitee.com/sentcms/sentcms.git
git@gitee.com:sentcms/sentcms.git
sentcms
sentcms
sentcms

Search