PHP notice

Trying to get property of non-object

/home/qualityequipment/public_html/protected/controllers/ProductController.php(185)

173         }
174     }
175 
176     /**
177      * Displays the contact page
178      */
179     public function actionEnquiry($seo_url)
180     {
181 
182         $model = new EnquiryForm;
183 
184         $product = Product::model()->findByAttributes(['seo_url' => $seo_url]);
185         $category = Category::model()->findByPk($product->product_type);
186         $gallery = Gallery::model()->with('galleryImages')->findByPk(5);
187 
188         $this->setPageTitle($product->browser_title);
189 
190 
191         if (isset($_POST['EnquiryForm'])) {
192 
193 
194             $model->attributes = $_POST['EnquiryForm'];
195 
196             if ($model->validate()) {
197 

Stack Trace

#14
+
 /home/qualityequipment/public_html/index.php(10): CApplication->run()
05 // remove the following lines when in production mode
06 defined('YII_DEBUG') or define('YII_DEBUG',true);
07 // specify how many levels of call stack should be shown in each log message
08 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
09 require_once($yii);
10 Yii::createWebApplication($config)->run();
2024-03-28 13:45:40 Apache Yii Framework/1.1.12