adam2314 / linet3

Linet accounting application
16 stars 18 forks source link

הצעת מחיר #553

Closed Linet3GithubApiUser closed 9 years ago

Linet3GithubApiUser commented 9 years ago

PHP notice

Trying to get property of non-object

C:\Program Files (x86)\linet\apache\htdocs\protected\controllers\DocsController.php(86)

74
75
76 /* 77 * Creates a new model. 78 * If creation is successful, the browser will be redirected to the 'view' page. 79 / 80 public function actionCreate($type = 1) { 81 $type = (isset($_POST['Docs']['doctype'])) ? (int) $_POST['Docs']['doctype'] : $type; 82 $model = new Docs(); 83
84 $model->doctype = $type; 85 $model->docType = Doctype::model()->findByPk($type); 86 if(!is_null($model->docType->oppt_account_type)) 87 $model->scenario="opppt_req"; 88
89 if($model->docType->id==9)//invrcpt 90 $model->scenario="invrcpt"; 91
92
93 // Uncomment the following line if AJAX validation is needed 94 $this->performAjaxValidation($model); 95 96
97 if (isset($_POST['Docs'])) { 98 $model->attributes = $_POST['Docs']; Stack Trace

0

unknown(0): DocsController->actionCreate("6")

1