PHP notice

Trying to get property of non-object

/var/www/html/site.cosmositios.com_current/protected/views/carrito/calificarProducto.php(498)

486         }).on("click", ".thumbnail.accesorios", function(e){
487             e.preventDefault();
488             
489             $(this).find(".precioCarta:last").click();
490             
491         }).on("click", ".nav.nav-pills .disabled a", function(e){
492             e.preventDefault();
493         });
494     ');
495     
496     if(isset($_GET['p']) && isset($_GET['id'])){
497         $p = Producto::model()->findByPk($_GET['id']);
498         if($p->marca0 != NULL && $p->marca0->ruta_logo != "" && $_GET['p'] > 2){
499             $logo = '<img src="/'.$p->marca0->ruta_logo.'" style="left: 0; margin-right: 5px; max-height: 70px; max-width: 130px; padding:0 15px; position: absolute; top: 0;" class="bgBody hidden-xs" />';
500         }else{
501             $logo = '';
502         }
503         $ultimaCategoria = "Servicio";
504         if($p->productoCategorias !== null){
505             $breadcrumbs = array();
506             $categorias = array();
507             $nomCats = array();
508             foreach($p->productoCategorias as $c){
509                 $categorias[$c->idCategoria->id_padre] = $c->idCategoria->id;
510                 $nomCats[$c->idCategoria->id] = $c->idCategoria->categoria;

Stack Trace

#4
+
 /var/www/html/site.cosmositios.com_current/protected/controllers/CarritoController.php(12610): CController->render("calificarProducto", array("vendedor" => Usuario))
12605         $this->subdominio = $user->subdominio;
12606         $this->estilos_css = $user->paginasVendedor[0]["estilos_css"].$user->paginasVendedor[0]["css_avanzado"];
12607         $vendedor = $user;
12608         $vars['vendedor'] = $vendedor;
12609         
12610         $this->render('calificarProducto', $vars);
12611     }
12612     
12613     public static function muestraEstrellas($model, $bootstrap = 2){
12614         setlocale(LC_ALL, 'es');
12615         //date_default_timezone_set('America/Mexico_City');
#17
+
 /var/www/html/site.cosmositios.com_current/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 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
14 ?>
2024-03-28 08:06:00 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 Yii Framework/1.1.13