CakePHP调试错误未定义属性:View ::

时间:2012-12-03 11:05:41

标签: debugging cakephp view undefined

我在debug.log中找到了很多这样的消息

2012-12-03 11:19:19 Notice: Notice (8): Undefined property: View::$Sidebar in [/cc/334520/cake/lib/Cake/View/View.php, line 804]
Trace:
View::__get() - CORE/Cake/View/View.php, line 804
include - APP/View/Layouts/**default.ctp, line 72**
View::_evaluate() - CORE/Cake/View/View.php, line 909
View::_render() - CORE/Cake/View/View.php, line 873
View::renderLayout() - CORE/Cake/View/View.php, line 527
View::render() - CORE/Cake/View/View.php, line 471
Controller::render() - CORE/Cake/Controller/Controller.php, line 938
ExceptionRenderer::_outputMessageSafe() - CORE/Cake/Error/ExceptionRenderer.php, line 285
ExceptionRenderer::_outputMessage() - CORE/Cake/Error/ExceptionRenderer.php, line 267
ExceptionRenderer::error400() - CORE/Cake/Error/ExceptionRenderer.php, line 209
ExceptionRenderer::render() - CORE/Cake/Error/ExceptionRenderer.php, line 165
ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 127
[main] - [internal], line ??

在default.ctp中,第72行我有

foreach($this->Sidebar->getZone() as $zoneId => $zoneValue){

但如果我调试($ this-> Sidebar-> getZone()),我会得到正确的结果反馈。 我不明白为什么我一直收到这个错误。有没有人对我有所了解?

提前致谢!

0 个答案:

没有答案