MDL-14741 - Prevent a notice occuring before configuration is done, and cleanup a bit of code
MDL-14741 - Prevent a notice occuring before configuration is done, and cleanup a bit of code

dilawar/moodle