[Notice] Trying to get property of non-object

GET /womens-sports/womens-swimming-and-diving/roster/athlete/2167

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

Stacey Avila » Herkimer Generals
2017-2018 Women's Swimming & Diving
Stacey Avila web pic

Stacey Avila

Year:
Sophomore
Hometown:
Bronx, NY
High School:
New Visions
Major:
Fashion Merchandising

- Return to Roster

Women's Swimming & Diving
×