PHP notice

Trying to get property 'tag' of non-object

/home/sprytechies/web/sprytechies.com/public_html/frontend/controllers/SiteController.php(88)

076     }
077      */
078 
079     public function actionPage($permalink = '') {
080         $permalink = '/' . $permalink;
081         //echo 'You requested '.$permalink.' page';
082         if ($permalink == '') {
083             $this->render('index', array('model' => new RequestForm()));
084         } else {
085             $model = Pages::model()->findByAttributes(array('permalink' => $permalink));
086             if (!$model) {
087                 $model = Tag::model()->findByAttributes(array('permalink' => $permalink));
088                 $tags = Tag::model()->findAllByAttributes(array('type' => 't'), 'tag<>"' . $model->tag . '"');
089                 if (!$model) {
090                     throw new CHttpException(404, 'The specified page cannot be found. Are you sure about the url? ' . $permalink);
091                 } else {
092                     $this->render('tag', array('model' => $model, 'tags' => $tags));
093                 }
094             } else {
095                 $this->render('page', array('model' => $model, 'reqform' => new RequestForm()));
096             }
097         }
098     }
099 
100     /**

Stack Trace

#7
+
 /home/sprytechies/web/sprytechies.com/public_html/common/components/WebApplication.php(33): CWebApplication->runController("site/page")
28      * that Apache polls its processes to see if they're alive. This function causes
29      * Yii to respond without logging errors.
30      */
31     public function runController($route) {
32         try {
33             parent::runController($route);
34         } catch (CHttpException $e) {
35             if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS' && @$_SERVER['REQUEST_URI'] == '*') {
36                 Yii::app()->end('Hello, friend!');
37             } else
38                 throw $e;
#10
+
 /home/sprytechies/web/sprytechies.com/public_html/frontend/www/index.php(44): CApplication->run()
39 EZendAutoloader::$basePath = Yii::getPathOfAlias('common.lib') . DIRECTORY_SEPARATOR;
40 
41 Yii::registerAutoloader(array("EZendAutoloader", "loadClass"), true);
42 */
43 
44 $app->run();
45 
46 /* uncomment if you wish to debug your resulting config */
47 /* echo '<pre>' . dump($config) . '</pre>'; */
2024-03-29 09:11:55 Apache/2.4.58 (Ubuntu) Yii Framework/1.1.13