PHP报错: Can't use method return value in write context

$dp_id = $this->getParam('dpId');
if(!empty($this->getParam('dpId'))) { 
$this->smarty->assign('developer', get_developers($this->getParam('dpId')));
}

以上PHP会报错: Can't use method return value in write context

解决办法为分开写

$dp_id = $this->getParam('dpId');
if(!empty($dp_id)) {
	$this->smarty->assign('developer', get_developers($this->getParam('dpId')));
}


posted @ 2015-10-08 14:34  MayBel  阅读(1119)  评论(0编辑  收藏  举报