PHP notice

Undefined offset: 0

/var/www/html/Yii/WebRoot/app/protected/controllers/ProductController.php(562)

550     }
551 
552     public function actionProductCard($url)
553     {
554         Yii::app()->theme = 'siniat2';
555         $product = Product::model()->with('productHasFile')->with('productAttributeSequences')->findByAttributes(array('url' => $url));
556         if ($product === null) {
557             throw new CHttpException(404, 'The requested page does not exist.');
558         }
559         $this->pageTitle = $product->systemName;
560         Yii::app()->clientScript->registerMetaTag($product->systemFamilyName, 'description');
561         if (isset($product->productHasCategory)) {
562             $category_id = $product->productHasCategory[0]->category_id;
563             $alias = Category::findCategoryAliasById($category_id);
564         }
565         $nextProduct = $product->getNextProduct($category_id);
566         $this->render('productCard', array('product' => $product, 'alias' => $alias, 'nextProduct' => $nextProduct, 'category_id' => $category_id));
567     }
568 
569 
570     public function actionPobierzPdf($id,$hash){
571 
572         if ($hash !== sha1($id.'siniatSecure1916')) {
573             throw new CHttpException(404, 'The requested page does not exist.');
574 

Stack Trace

#12
+
 /var/www/html/Yii/WebRoot/app/index.php(18): CApplication->run()
13 defined('YII_DEBUG') or define('YII_DEBUG',true);
14 // specify how many levels of call stack should be shown in each log message
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
19 // Yii::app()->cache(0);
20 
2024-03-28 11:04:56 Apache/2.4.25 (Debian) Yii Framework/1.1.15