[8] ErrorException in ContentModel.php line 13

未定义数组索引: mid

  1. use think\Db;
  2. class ContentModel extends Model
  3. {
  4. protected $name='content';
  5. public function getContentByCon($con)
  6. {
  7. $diymodelmodel = new DiymodelModel();
  8. $tabname = $diymodelmodel->where(['id'=>$con['mid']])->value('tabname');
  9. $info = db('diy_'.$tabname)->where(['conid'=>$con['vid']])->find();
  10. if ($info) {
  11. $con = array_merge($con, $info);
  12. }
  13. $con = $this->getContentStr($con);
  14. return $con;
  15. }