moodleou / moodle-mod_forumng

ForumNG forum module for Moodle
19 stars 20 forks source link

Change require to require_once to stop unit tests crashing #26

Closed micaherne closed 10 years ago

micaherne commented 10 years ago

When running the full unit test suite on a Moodle install with forumng in it, we are getting a fatal error:

PHP Fatal error: Cannot redeclare make_log_url() (previously declared in /var/www/jyhoam-test/course/lib.php:61) in /var/www/jyhoam-test/course/lib.php on line 142

This is because forumng is trying to include /course/lib.php for a second time. If we change the "require" to a "require_once" it fixes the problem.

Cheers

Michael

jason-platts commented 10 years ago

Thanks for spotting this Michael,

I've committed your patch and it will be pushed upstream next time we update our repo.