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')));
}


原文地址:https://www.cnblogs.com/meibao/p/4860975.html