PHP notice

Undefined variable: totalComment

/home/activesites/coupon4savings/protected/modules/coupon/controllers/public/CouponController.php(181)

169                     $item = $feed->createNewItem();
170 //                    $creater = $coupon->createdBy->displayName;
171 //                $totalComment = $coupon->commentTotal ? $coupon->commentTotal : $coupon->countComent; 
172 
173                 $item->addTag('title', $coupon->title);
174                 $item->addTag('link', $coupon->url);
175                 $item->addTag('comments', $coupon->url . '#comments');
176                 $item->date = $date->getCurrentTime($coupon->publish_date);
177                 $item->addTag('dc:creator', $creater);
178                 $item->description = $coupon->title;
179                 $item->addTag('content:encoded', $coupon->content);
180 //                $item->addTag('wfw:commentRss', $coupon->feedUrl);
181                 $item->addTag('slash:comments', $totalComment);
182 
183                 $feed->addItem($item);
184             }
185         }
186 
187         $feed->generateFeed();
188 
189         Yii::app()->end();
190     }
191 
192     public function actionGo($id) {
193         $with = array(

Stack Trace

#9
+
 /home/activesites/coupon4savings/index.php(20): CApplication->run()
15 
16 require_once($yii);
17 require_once(ABS_PATH . '/protected/components/MegaAdsApplication.php');
18 
19 $app = new MegaAdsApplication($config);
20 $app->run();
2024-03-19 07:48:48 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.33 Yii Framework/1.1.13