PHP notice

Undefined offset: 0

/home/oliva/public_html/protected/views/layouts/main.php(16)

04         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
05         <title><?php echo $this->title;?></title>
06         <meta name="description" content="<?php echo strip_tags($this->description); ?>">
07       <meta name="keywords" content="<?php echo $this->keywords; ?>">
08 
09       <meta name="viewport" content="width=device-width, initial-scale=1.0">
10       <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
11 
12     <?php if(isset($this->product) && $this->product->get_imgs() != NULL){?>
13       <meta property="og:image" content="<?php echo Yii::app()->getBaseUrl(true).'/images/'.Yii::app()->params['id_store'].'/products/'.$this->product->get_imgs(0)->get_img_m(); ?>" />
14     <?php }elseif(isset($this->category) && $this->category->get_img_m() != NULL){?>
15       <meta property="og:image" content="<?php echo Yii::app()->getBaseUrl(true).'/images/'.Yii::app()->params['id_store'].'/products/'.$this->category->get_img_m(); ?>" />
16     <?php }elseif(isset($this->products) && $this->products[0]->get_imgs(0)->get_img_m() != NULL){?>
17       <meta property="og:image" content="<?php echo Yii::app()->getBaseUrl(true).'/images/'.Yii::app()->params['id_store'].'/products/'.$this->products[0]->get_imgs(0)->get_img_m(); ?>" />
18     <?php }elseif(isset($this->cms) && $this->cms->getChildren()[0]->get_img_url() != NULL){?>
19       <meta property="og:image" content="<?php echo Yii::app()->getBaseUrl(true).'/images/'.Yii::app()->params['id_store'].'/cms/'.$this->cms->getChildren()[0]->get_img_url(); ?>" />
20     <?php } ?>
21       
22     <link rel="icon" type="image/png" sizes="16x16" href="<?php echo Yii::app()->getBaseUrl(true)?>/images/layout/favicon.ico">
23 
24       <link href='http://fonts.googleapis.com/css?family=Exo:100,200,300,400,500,600,700,800,900,100italic,200italic,300italic,400italic,500italic,900italic,800italic,700italic,600italic' rel='stylesheet' type='text/css'>
25 
26     <link href="<?php echo Yii::app()->getBaseUrl(true)  ?>/css/jquery.mmenu.all.min.css" rel="stylesheet" type="text/css" media="screen,projection"/> 
27       <link href="<?php echo Yii::app()->getBaseUrl(true)  ?>/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen,projection"/>    
28       <link href="<?php echo Yii::app()->getBaseUrl(true)  ?>/css/jquery.fancybox.css" rel="stylesheet" type="text/css" media="screen,projection"/>    

Stack Trace

#7
+
 /home/oliva/public_html/protected/views/layouts/column1.php(5): CBaseController->endContent()
1 <?php $this->beginContent('//layouts/main'); ?>
2 
3     <?php echo $content; ?>
4 
5 <?php $this->endContent();
#11
+
 /home/oliva/public_html/protected/modules/cms/controllers/DefaultController.php(153): CController->render("region")
148                 $this->products = Products::findAllOfCategoryId($product, $page=1, 999999, $order = 'phc.position');
149                 $this->category = Categories::find($product);
150             }
151 
152             $this->cms_root = MyCms::find(3);
153             $this->render('region');    
154         }else{
155             $this->render('index');    
156         }
157     }
158 }
#19
+
 /home/oliva/public_html/index.php(16): CApplication->run()
11 error_reporting(E_ALL);
12 ini_set('display_errors', '1'); 
13 
14 
15 require_once($yii);
16 Yii::createWebApplication($config)->run(); 
2017-10-21 19:35:50 Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 mod_perl/2.0.8 Perl/v5.10.1 Yii Framework/1.1.15