PHP warning

Attempt to read property "name" on null

/mnt/HC_Volume_23321257/focusextranet/public_html/protected/controllers/Front_ListController.php(1114)

1102             ->join( "cities ci", "ci.id = bs.cityId" )
1103             ->join( "counties co", "co.id = bs.countyId" )
1104             ->where( "bs.businessId = ".$business->id )
1105             ->queryAll();
1106 
1107         $county         = getCountyDetails( $business->countyId );
1108         $city           = getCityDetails( $business->cityId );
1109 
1110         if(!empty($business->lat) && ! empty($business->long)) {
1111             $markerList [0]= floatval($business->lat).", ".floatval($business->long);
1112         }
1113         else {
1114             $markerList [0]= $business->address.", ".$city->name.", ".$county->name;
1115         }
1116 
1117         if( ! empty( $itemsList ) )
1118         {
1119             foreach( $itemsList as $item ) {
1120                 if (!empty($item["lat"]) && !empty($item["long"])) {
1121                     $markerList [] = floatval($item["lat"]).", ".floatval($item["long"]);
1122                 }
1123                 else {
1124                     $markerList [] = $item["address"].", ".$item["cityName"].", ".$item["countyName"];
1125                 }
1126             }

Stack Trace

#0
+
 /mnt/HC_Volume_23321257/focusextranet/public_html/protected/controllers/Front_ListController.php(196): Front_ListController->loadMarkersForMap(BusinessModel)
191         {
192             $this->data["hideTopMap"] = TRUE;
193         }
194 
195         if (DOMAIN_ID == 3) {
196             $this->loadMarkersForMap( $business );
197         }
198         else {
199             $this->loadSubsidiariesOnMap( $business );
200         }
201 
#13
+
 /mnt/HC_Volume_23321257/focusextranet/public_html/catalogafaceri.ro/public_html/index.php(44): CApplication->run()
39 define( "LANGUAGE_PATH", BASE_PATH."protected/languages/" );
40 
41 date_default_timezone_set( "Europe/Bucharest" );
42 
43 require_once( $yii );
44 Yii::createWebApplication( $config )->run();
2024-03-28 16:10:46 Apache Yii Framework/1.1.10