Fix undefined property notice
Fix undefined index notice
Fix bug in secondary tabs theme function
Fix notices on user profile page