Notice Error: Trying to get property 'attributes' of non-object