Changed line 628 to properly check if register_sub_post_type exists by wrapping in single quotes. This prevents PHP Notice messages when Debugging.
Added default values for certain variables to avoid PHP Notices while debugging.