Error

Call to a member function getSortedProjectImages() on null

/var/www/dev.markerpaint/app/src/protected/controllers/ProjectsController.php(60)

48         ]);
49 
50     }
51 
52     public function actionView($slug)
53     {
54         
55         Yii::app()->getClientScript()->registerCssFile('https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css');
56         Yii::app()->getClientScript()->registerScriptFile('https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js');
57 
58         $project = Project::model()->findByAttributes(['url' => $slug]);
59 
60         $sortedImages = $project->getSortedProjectImages();
61 
62         if (empty($project)) {
63             throw new CHttpException('404', 'Проект не найден');
64         }
65         // $this->setLastModified($article);
66         // $article->viewsUp();
67         Yii::app()->controller->pageTitle = $project->title;
68         $this->pageDescription = $project->title;
69 
70         // Yii::app()->clientScript->registerMetaTag('Проекты', 'description');
71         // $this->seo_title = 'Проекты';
72 

Stack Trace

#9
+
 /var/www/dev.markerpaint/app/src/index.php(30): CApplication->run()
25 
26 // specify how many levels of call stack should be shown in each log message
27 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
28 
29 require_once($yii);
30 Yii::createWebApplication($config)->run();
2024-03-28 12:14:25 nginx/1.14.1 Yii Framework/1.1.20