PHP notice

Trying to get property of non-object

/home/uu001/uu.edu.ua/ab/protected/modules/edu/views/front/eduunit/region.php(29)

17 
18 <div class="edu-unit-list">
19     <?php
20     foreach ($units as $u => $unit):
21         $catagoryId[] = $unit->id;
22         ?>
23         <section data-user="<?= $u ?>">
24             <a href="<?= $unit->webaddress ?>" class="goto"><?= Yii::t('main', 'перейти на сайт') ?></a>
25             <div class="name">
26                 <?= $unit->title ?>
27             </div>
28             <div class="address">
29                 <?= $unit->lang->address ?>
30             </div>
31             <div class="phone">
32                 <?= $unit->phone ?>
33             </div>
34             <div class="email">
35                 <?= $unit->email ?>
36             </div>
37             <?php
38             if (count($faculty) > 0) {
39                 foreach ($faculty as $f):
40                     if ($f->unit == $unit->id):
41                         ?>

Stack Trace

#4
+
 /home/uu001/uu.edu.ua/ab/protected/modules/edu/controllers/front/EduunitController.php(69): CController->render("region", array("region" => EduRegion, "units" => array(EduUnit), "faculty" => array()))
64 
65         $this->render('region', array(
66             'region' => $region,
67             'units' => $units,
68             'faculty' => $faculty,
69         ));
70     }
71 
72     /**
73      * Displays a particular model.
74      * @param string $alias the alias of the model to be displayed
#14
+
 /home/uu001/uu.edu.ua/ab/protected/components/WebApplicationOfficeBehavior.php(50): CApplication->run()
45         $this->onModuleCreate(new CEvent($this->owner));
46 
47         register_shutdown_function(array($this, 'onShutdownHandler'));
48         
49         
50         $this->owner->run(); // Run application.
51 
52         if (!Yii::app()->request->isAjaxRequest)
53         {
54             Yii::app()->user->setState('__returnUrl', Yii::app()->request->requestUri);
55         }
#17
+
 /home/uu001/uu.edu.ua/ab/index.php(21): CComponent->__call("runOffice", array("front"))
16 defined('YII_DEBUG') or define('YII_DEBUG', true);
17 // specify how many levels of call stack should be shown in each log message
18 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
19 
20 require_once($yii);
21 Yii::createWebApplication($config)->runOffice('front');
22 
23 
2024-03-28 17:39:48 Apache Yii Framework/1.1.15