php5.4報的一個錯誤(待續。。。。)
1. 原函式呼叫:$tag_sel = array_shift(explode(' ', $tag));
報錯:
Only variables should be passed by reference
修改為:
$tag_sel = array_shift($temp);
2.Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in
原函式呼叫:$module = MODULE_NAME."Module";
return call_user_func(array($module
修改為:$module = MODULE_NAME."Module";
$obj=new $module();
return call_user_func(array($obj,$fun),$para);
3.Call to a member function on a non-object
原函式呼叫:
$this->db = pc_base::load_model('category_model');
$ta=$this->db->query('SELECT * FROM v9_category where parentid=15 ');
修改為:$this->prdb=pc_base::load_model('category_model');
$tmp=new $this->prdb();
$prod=$tmp->get_one("'thumb'!='' ",'*','updatetime DESC');