ParseError

syntax error, unexpected token "::", expecting "("

/homepages/7/d527667691/htdocs/steeldart/protected/models/Player.php(36)

24     }
25 
26     public function rules()
27     {
28         return array(
29             array('playerID, name,surname, teamID, gender', 'required'),
30             array('games', 'length', 'max' => 255),
31         );
32     }
33 
34     public function playerHasWon($matchID, $playerID)
35     {
36         $match = Match::model()->findByPk($matchID);
37         if ($match->isDouble == 0) {
38 
39             if ($match->homePlayerID == $playerID) {
40                 if ($match->home > $match->away)
41                     return 'won';
42                 else
43                     return 'lost';
44             } else {
45                 if ($match->home < $match->away)
46                     return 'won';
47                 else
48                     return 'lost';

Stack Trace

#0
+
 /homepages/7/d527667691/htdocs/steeldart/protected/controllers/PlayerController.php(30): YiiBase::autoload()
25         $this->render('double', array('players' => $players, 'league' => $league));
26     }
27 
28     public function actionDetails($playerID)
29     {
30         $model           = Player::model()->findByPk($playerID);
31         $this->pageTitle = utf8_encode($model->name) . ' ' . utf8_decode($model->surname[0]) . '. im Detail - ' . Yii::app()->name;
32 
33         $this->render('details', array('player' => $model));
34     }
35 
#10
+
 /homepages/7/d527667691/htdocs/steeldart/index.php(9): CApplication->run()
4 setlocale(LC_TIME, "de_DE");
5 setlocale(LC_ALL, 'de_DE');
6 defined('YII_DEBUG') or define('YII_DEBUG', true);
7 $config = dirname(__FILE__) . '/protected/config/main.php';
8 require_once(dirname(__FILE__) . '/framework/yii.php');
9 Yii::createWebApplication($config)->run();
2024-03-28 20:05:30 Apache Yii Framework/1.1.14