500 PHP Error

Trying to get property of non-object