PHP notice

Trying to get property of non-object

/var/www/sites571/data/www/gigafootball.net/protected/views/quotes/view.php(81)

69                                                                                                         
70                                                     
71             <h3>Комментарии: <b><span id="count_comm"><?php echo count($comments); ?></span></b> <i class="fa fa-comment-o"></i></h3>
72             <?php if (!empty($comments)) { ?>
73             <ul class="media-list">
74                 <?php foreach($comments as $comment) { ?>
75                                                         
76                                                         
77               <li class="media blog-entry">
78                 <div class="pull-left">
79                      <?php
80                         $user = Users::model()->findByAttributes(array('login' => $comment->user));
81                         $adr = '<img width="50" height="50" class="img-circle" src="'.Yii::app()->request->baseUrl.'/images/ava/'.$user->ava.'" alt="'.CHtml::encode($user->login).'" title="'.CHtml::encode($user->login).'" />';
82                      ?>
83                      <?php echo $adr; ?>
84                 </div>
85                 <div class="media-body">
86                   <div class="blog-entry-content">
87                       <b><a href="<?php echo Yii::app()->request->baseUrl; ?>/my/<?php echo $comment->user; ?>"><?php echo $comment->user; ?></a></b>
88                      <?php if ( isset(Yii::app()->user->login) && $comment->user != Yii::app()->user->login ) { ?>
89                         <small style="float: right;"><a onclick="reply('<?php echo $comment->user; ?>')"><i class="fa fa-pencil" title="Ответить" style="cursor: pointer;"></i></a></small>
90                      <?php } ?>
91                     <div class="date"><i class="fa fa-calendar"></i> <?php echo BasicFunctions::trueDate($comment->date); ?></div>
92                     <div class="content">
93                       <p>

Stack Trace

#4
+
 /var/www/sites571/data/www/gigafootball.net/protected/controllers/QuotesController.php(57): CController->render("view", array("item" => Quotes, "comments" => array(QuotesComm)))
52             $this->pageTitle = $q;
53             Yii::app()->params->desc = $quote->text;
54 
55             $comments = QuotesComm::model()->findAllByAttributes(array('quote_id' => $id), array('order' => 'id DESC'));
56 
57             $this->render('view', array('item' => $quote, 'comments' => $comments));
58         }else{
59             $this->redirect(Yii::app()->request->baseUrl.'/site/error/');
60             exit;
61         }
62     }
#14
+
 /var/www/sites571/data/www/gigafootball.net/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-28 18:12:29 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 Yii Framework/1.1.13