PHP warning

Attempt to read property "results" on null

/home/3/s/stormkast/www/protected/modules/sc/views/default/roundScores.php(121)

109 
110 
111         
112         
113         $distrubution = [
114             '-x' => 0,
115 //            '-1' => 0,
116             'par' => 0,
117             '+1' => 0,
118             '+x' => 0,
119         ];
120         
121         $holes = $result->result->results;
122         $scoreValue = 0;
123         $avstand = 0;        
124         foreach ($holes as $holeNum => $hole) {
125             $avstand += $hole->avstand;
126             
127             $par = $hole->res - $hole->avstand;
128             $scoreClass = ResultHelper::getScoreClassName($par, $hole->res);
129             $scoreName = ResultHelper::getScoreText($par, $hole->res);
130 
131             echo "<td class='scoreTd'><span class='{$scoreClass} scoreSpan' title='{$holeNames[$holeNum]}: {$scoreName}'>" . $hole->res . "</span></td>";
132 
133             

Stack Trace

#3
+
 /home/3/s/stormkast/www/protected/modules/sc/views/default/runde.php(176): CController->renderPartial("roundScores", array("what" => "2", "year" => "2013", "round" => "26"))
171     </ul>
172 
173 
174     <div id="tabs-0">
175         <?php
176         $this->renderPartial( "roundScores", array(
177         "what" => $what,
178         "year" => $year,
179         "round" => $round,
180 
181         ) );
#8
+
 /home/3/s/stormkast/www/protected/modules/sc/controllers/DefaultController.php(25): CController->render("runde", array("what" => "2", "year" => "2013", "round" => "26"))
20         $this->render('scAdmin');
21     }
22 
23 
24     public function actionRunde($what = 2, $year, $round) {
25         $this->render('runde', array( "what" => $what, "year" => $year, "round" => $round ) );
26     }
27     
28     public function actionStats() {
29         $this->render('stats', array() );
30     }
#18
+
 /home/3/s/stormkast/www/index.php(17): CApplication->run()
12          ini_set('post_max_size', '23M');
13         ini_set('upload_max_filesize', '23M');
14         
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2024-03-29 08:20:41 Apache/2.4.41 Yii Framework/1.1.27