PHP notice

Undefined offset: 0

/var/www/languagetrainers.com/public/reviews/book-reviews/protected/views/site/review.php(70)

58       <span class="desc"><?php echo $book->description ?></span>
59 
60 
61       <span class="social">
62         <span itemscope itemtype="http://schema.org/Review">
63           <span itemprop="itemReviewed" itemscope itemtype="https://schema.org/Book">
64             <meta itemprop="name" content="<?php echo $book->metadata->title ?>" />
65             <meta itemprop="image" content="<?php echo Yii::app()->params['imagesPath'] ?>/uploads/<?php echo Helpers::encodeURIComponent($book->cover_pic) ?>">
66           </span>
67           <meta itemprop="name" content="I just read this review for “<?php echo ($book->metadata->title) ?>” book and there is plenty more where that came from! Visit Language Trainers Foreign Book Reviews and see what the experts have to say." />
68           <span itemprop="author" itemscope itemtype="https://schema.org/Person">
69           <?php $review=(Review::model()->getApprovedReviews($book->id)); ?>
70             <span itemprop="name"><?php echo $review[0]->reviewer->profile->first_name ?> <?php echo $review[0]->reviewer->profile->last_name ?></span>
71           </span>
72         </span>
73 
74 
75         <div id="linkshare"><span class="shares">Share this book:</span>
76           <script>
77             function fbs_click() {
78               u = location.href;
79               t = document.title;
80               window.open("http://www.facebook.com/sharer.php?s=100&p[url]=" + encodeURIComponent(u) + "&p[title]=" + encodeURIComponent(t) +
81                 "&p[summary]=I just read this review for “<?php echo Helpers::encodeURIComponent($book->metadata->title) ?>” book and there is plenty more where that came from! Visit Language Trainers Foreign Book Reviews and see what the experts have to say." +
82                 "&p[images][0]=http://languagetrainers.com/reviews/book-reviews/uploads/<?php echo Helpers::encodeURIComponent($book->cover_pic) ?>", "sharer", "toolbar=0,status=0,width=626,height=436");

Stack Trace

#4
+
 /var/www/languagetrainers.com/public/reviews/book-reviews/protected/controllers/SiteController.php(148): CController->render("review", array("book" => FictionBook))
143     public function actionReview() {
144         $book = FictionBook::model()->findByAttributes(array('url'=>$_GET['url']));
145         
146         if ($book) {
147             $this->render('review', array(
148                 'book' => $book));
149         } else {
150             throw new CHttpException(404, 'The requested page does not exist.');
151         }
152     }
153 
#17
+
 /var/www/languagetrainers.com/public/reviews/book-reviews/index.php(19): CApplication->run()
14 defined('YII_DEBUG') or define('YII_DEBUG',true);
15 // specify how many levels of call stack should be shown in each log message
16 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
17 
18 require_once($yii);
19 Yii::createWebApplication($config)->run();
2024-03-28 15:07:01 nginx/1.22.0 Yii Framework/1.1.13