[Notice] Trying to get property of non-object

GET /mens-sports/mens-swimming-and-diving/roster/athlete/2164

Line 31 in /home/herkimer/www/roster/code/RosterHolderPage.php

Source

22 
23   private static $allowed_actions = array(
24     'athlete',
25     'archive'
26   );
27 
28   public function athlete() {
29     if($athlete = RosterMember::get()->byID($this->request->param('ID'))) {
30 
31       $year = substr($athlete->Rosters()->first()->Title, 0, 4);
32 
33       $returnlink = false;
34       if(array_key_exists('HTTP_REFERER', $_SERVER) && strpos($_SERVER['HTTP_REFERER'], 'archive') !== false) {
35         $returnlink = Controller::join_links(
36               Director::get_current_page()->Link(),
37               'archive',

Trace

Corde Smart » Herkimer Generals
2017-2018 Men's Swimming and Diving
smart

Corde Smart

Year:
Sophomore
Hometown:
Oakfield, NY
High School:
Oakfield-Alabama High School
Major:
Human Services

- Return to Roster

Men's Swimming & Diving
×