Error

Call to a member function url() on null

/home/arendazala.by/www/protected/controllers/CategoryController.php(22)

10     {
11 
12         // перенаправление со старой версии сайта ASP
13         if (!empty($_GET['category'])) {
14             $parts = explode('.',$_GET['category']);
15             $oldCat = $parts[0];
16             if (!empty($parts[1]) && $parts[1] === 'asp') {
17                 if ($oldCat != 'news') {
18                     if (!empty($_GET['id'])) {
19                         $import = Azimport::model()->findByPk($_GET['id']);
20                         if (!empty($import->hall_id)) {
21                             $hall = Hall::model()->findByPk($import->hall_id);
22                             $this->redirect($hall->url());
23                         }
24                     }
25                 }
26                 $catRedirect = array(
27                     'conf'      => 'halls/confrerence-halls',
28                     'banq'      => 'halls/banquets',
29                     'cott'      => 'halls/dom/cottages',
30                     'catering'  => 'organization/catering',
31                     'curtain'   => 'organization/tents',
32                     'transport' => 'transport',
33                     'news'      => 'wiki',
34                     'cont'      => 'info/contacts.html',

Stack Trace

#7
+
 /home/arendazala.by/www/index.php(59): CApplication->run()
54 
55 // require yii
56 require_once($yii);
57 
58 // run web application
59 Yii::createWebApplication($config)->run();
2024-03-28 23:53:25 nginx/1.14.2 Yii Framework/1.1.14