0

我在 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){

但是如果我 debug($this->Sidebar->getZone()) 我得到一个正确的结果反馈。我不明白为什么我不断收到此错误。有人对我有想法吗?

提前致谢!

4

0 回答 0