PHP notice

Trying to get property 'name' of non-object

/var/www/clients/client4/web4/web/protected/application/views/frontend/partials/authors-preview.php(5)

1 <?php if(!empty($authors)): ?>
2     <br />
3     <?php foreach($authors as $author): ?>
4         <a target="_blank" class="author-tag" href="<?=$this->createUrl('frontend/authors/preview', array('author_id' => $author->author_id))?>">
5             <?=$author->author->name?> <?=$author->author->surname?> <?=$author->author->lastname?>
6         </a>
7     <?php endforeach; ?>

8 <?php endif; ?>

Stack Trace

#3
+
 /var/www/clients/client4/web4/web/protected/application/views/frontend/partials/publications-list.php(88): CController->renderPartial("/frontend/partials/authors-preview", array("authors" => array(PublicationAuthors)))
83             </td>

84             <?php endif; ?>
            
85             <?php if(isset($publications[0]) && !$publications[0]->is_quote): ?>
86             <td>
87                 <a class="publication-statistics" href="<?=$this -> createUrl('frontend/publications/statistics', array('publication_id' => $publication -> id)) ?>">

88                     <?=Yii::t('general', 'statistics') ?>

89                 </a>
90             </td>
91             <?php endif; ?>
            
92             <?php if($this->isAdministrator()): ?>
93             <td>
#7
+
 /var/www/clients/client4/web4/web/protected/application/views/frontend/publications/index.php(19): CController->renderPartial("/frontend/partials/publications-list", array("publications" => array(Publication, Publication, Publication, Publication, ...), "pages" => CPagination))
14 ?>
15 
16 <?php 
17     $this->renderPartial('/frontend/partials/publications-list', array(
18         'publications'        =>    $publications,
19         'pages'                =>    $pages
20     ));
21 ?>
#12
+
 /var/www/clients/client4/web4/web/protected/application/controllers/frontend/PublicationsController.php(469): CController->render("index", array("publications" => array(Publication, Publication, Publication, Publication, ...), "pages" => CPagination, "btnLabel" => "Филтриране"))
464             $publications                 =    $this->getPublications($publications);
465 
466             $this->render('index', array(
467                 'publications'        =>    $publications,
468                 'pages'                =>    $pages,
469                 'btnLabel'            =>    Yii::t('general', 'filter'),
470             ));
471         }
472         
473         
474         /*
2024-03-28 18:56:23 Apache Yii Framework/1.1.17