Error

Call to a member function getCaption() on null

/home/httpd/vhosts/egypt-business.com/20231113-164526/protected/modules/article/controllers/StreamController.php(198)

186                         $current["Caption2"] = $c2->getCaption();
187                         $current["Caption"] = $current["Caption2"];
188                         $current["Title"] = $c2->getTitle();
189                         if (!empty($c2->localcaption->c2cText) || !empty($c2->localcaption->c2cText2)) {
190                             $current["Text"] = !empty($c2->localcaption->c2cText) ? $c2->localcaption->c2cText : '';
191                             $current["Text2"] = !empty($c2->localcaption->c2cText2) ? $c2->localcaption->c2cText2 : $current["Text"];
192                         }
193                         if (!empty($p[3])) {
194                             $c3 = CategoriesL3::model()->find("c3Name = :c3 AND c32ID = :c2", array(":c3" => $p[3], ":c2" => $c2->c2ID));
195                             $flaggedcategories[3] = $c3->c3ID;
196                             $current["URL3"] = '/' . $mainScenario . '/' . strtolower($c1->c1Name) . '/' . strtolower($c2->c2Name) . '/' . strtolower($c3->c3Name);
197                             $current["Name3"] = $c3->c3Name;
198                             $current["Caption3"] = $c3->getCaption();
199                             $current["Caption"] = $current["Caption3"];
200                             $current["Title"] = $c3->getTitle();
201                             if (!empty($c3->localcaption->c3cText) || !empty($c3->localcaption->c3cText2)) {
202                                 $current["Text"] = $c3->localcaption->c3cText;
203                                 $current["Text2"] = !empty($c3->localcaption->c3cText2) ? $c3->localcaption->c3cText2 : $c3->localcaption->c3cText;
204                             }
205                         } else {
206                             // load sub categories of c2
207                             $sql = "SELECT c3ID as CatID3, c3Name as Name3, count(ccCID) AS Anzahl
208                     FROM categories_l3
209                     JOIN `content_categories` ON ccCatID3=c3ID
210                     WHERE c32ID=:previd

Stack Trace

#14
+
 /home/httpd/vhosts/egypt-business.com/20231113-164526/maboyii/index.php(96): CApplication->run()
091 defined('YII_DEBUG') or define('YII_DEBUG',true);
092 // specify how many levels of call stack should be shown in each log message
093 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
094 
095 require_once($yii);
096 Yii::createWebApplication($config)->run();
097 
098 //*
099   if ((!empty(Yii::app()->params['matomo']['id']))&&($_SERVER['REQUEST_URI'] != '/statistics/increment')) {
100     set_include_path(get_include_path() . PATH_SEPARATOR . '../protected/vendors/matomo-php-client/');
101     require_once('../protected/vendors/matomo-php-client/MatomoTracker.php');
2024-03-28 19:30:00 nginx/1.18.0 Yii Framework/1.1.28