PHP notice

Trying to get property of non-object

C:\xampp\htdocs\nada_uptown\protected\controllers\ListinoController.php(126)

114            $this->pageTitle = 'Ricerca '. $query.' | Uptown | Tecnologia e design in evidenza';
115             $this->description = 'Ricerca ' . $query . ' ' . titoliPagine::descrizioniListino('ciao');
116         $articoli = new CArrayDataProvider($model, array('pagination' => array('pageSize' => 10)));
117         $carrello = Carrello::leggi();
118         $this->render('ricerca', array('dataProvider' => $articoli, 'carrello' => $carrello, 'query' => $query, 'specifiche' => $specifiche, 'filtri' => $filtri, 'ids' => $ids, 'gruppi' => $gruppi));
119     }
120 
121     public function actionSchedaProdotto($id, $titolo = null, $limit = 3) {
122         $this->banner=false;
123         // Yii::app()->Cookies->delCmsg('visualizzati');
124         $articolo = ArticoliWebElaborati::model()->findByPk($id);
125        
126         $this->pageTitle = substr($articolo->titolo, 0, strlen($articolo->titolo) - 2);
127         $this->description = substr($articolo->titolo, 0, strlen($articolo->titolo) - 2);
128         $criteria = new CDbCriteria;
129         $criteria->limit = $limit;
130         $criteria->order = 'id desc';
131         $criteria->compare('t.id_articolo_web', $articolo->id_articolo_web);
132         $criteria->addCondition('t.id_domanda is null');
133         $domande = DomandeArticolo::model()->with('risposte')->findAll($criteria);
134         $ids = Yii::app()->Cookies->getCMsg('visualizzati');
135         if ($ids != null) {
136             array_push($ids, $id);
137             if (count($ids) > 8) {
138                 unset($ids[0]);

Stack Trace

#9
+
 C:\xampp\htdocs\nada_uptown\index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 //// specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 //header('Content-Type: text/html; charset=ISO-8859-1');
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 12:30:20 Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38 Yii Framework/1.1.17