0
我試過,但沒有能夠解決,檢查和越來越嚴格的標準嚴格的標準錯誤,無法解決
嚴格的標準錯誤:只有變量應該通過參考...
傳遞
我在做什麼錯 - 如何糾正它
$this->assignRef('prodDet' , $prodDet);
$this->assignRef('CatName' , $modelNewcar->getCatName($id));
$this->assignRef('nav' , $nav);
$this->assignRef('CatList' , $modelNewcar->loadMainCat($brand,$Carmodel,$minprice,$maxprice,$fuel_type));
$this->assignRef('CatName' , $modelNewcar->getCatName);
parent::display($tpl);
在下面是原碼
function display($tpl = null)
{
$mainframe =JFactory::getApplication();
$option = JRequest::getCmd('option');
$db =JFactory::getDBO();
$user = JFactory::getUser();
// Push a model into the view
$model = $this->getModel();
$modelNewcar = $this->getModel('product');
$id = JRequest::getVar('id','','default','int');
$vid = JRequest::getVar('vid','','default','int');
$prodDet = $modelNewcar->loadProduct($id,$vid);
$this->assignRef('prodDet' , $prodDet);
$this->assignRef('CatName' , $modelNewcar->getCatName($id));
parent::display($tpl);
}
function display($tpl = null)
{
$db =JFactory::getDBO();
$user = JFactory::getUser();
// Push a model into the view
$model =$this->getModel();
$modelNewcar =$this->getModel('category');
$brand = JRequest::getVar('brand','','default','int');
$Carmodel = JRequest::getVar('model','','default','int');
$minprice = JRequest::getVar('minprice','','default','int');
$maxprice = JRequest::getVar('maxprice','','default','int');
$fuel_type = JRequest::getVar('fuel_type','','default','');
$this->assignRef('nav' , $nav);
$this->assignRef('CatList' , $modelNewcar->loadMainCat($brand,$Carmodel,$minprice,$maxprice,$fuel_type));
$this->assignRef('CatName' , $modelNewcar->getCatName);
parent::display($tpl);
}