PHP notice

Trying to get property of non-object

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

132         );
133         $feed->setNoCloseElements($noCloseElements);
134 
135         $feed->title = isset(Yii::app()->params['siteTitle']) ? Yii::app()->params['siteTitle'] : 'Feed';
136 
137         if ($list != 'home')
138             $feed->title .= ' » ' . $object->title;
139 
140         $feedLink = ($list == 'home') ? Yii::app()->createAbsoluteUrl('/') : $object->url;
141 
142         $linkParams = array();
143 
144         if ($object->slug)
145             $linkParams['slug'] = $object->slug;
146 
147         if ($list != 'home')
148             $linkParams['list'] = $list;
149 
150         if ($post_type)
151             $linkParams['post_type'] = $post_type;
152 
153 // atom:link
154         $feed->addChannelTag('atom:link', array('href' => Yii::app()->createAbsoluteUrl('/coupon/public/coupon/feed', $linkParams), 'rel' => 'self', 'type' => 'application/rss+xml'));
155         $feed->addChannelTag('link', $feedLink);
156         $feed->addChannelTag('description', 'back to home page');

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 02:07:34 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.33 Yii Framework/1.1.13