致命错误:在非对象上调用成员函数setTitle()

|| 当我尝试下订单时,在选择送货方式时出现错误提示
Fatal error: Call to a member function setTitle() on a non-object in /home/exclus31/public_html/../../../app/code/core/Mage/Customer/Block/Form/Login.php on line 40
但是下订单并获得特定订单的确认消息没有问题。 谁知道为什么显示此错误以及对此的解决方案?
已邀请:
我也有这个错误。这是因为在加载布局之前,我在
IndexAction()
中调用了
getLayout()
。只需先拨打
loadLayout()
,就像这样:
public function IndexAction() {
  $this->loadLayout(); // do this first
  $this->getLayout()->getBlock(\'head\')->setTitle($this->__(\'My Title\')); // then this works
  $this->renderLayout(); // render as usual
}
我希望这有帮助

要回复问题请先登录注册