Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron failes when chairman module has no president #1

Open
ewallah opened this issue Jul 4, 2013 · 0 comments
Open

Cron failes when chairman module has no president #1

ewallah opened this issue Jul 4, 2013 · 0 comments

Comments

@ewallah
Copy link

ewallah commented Jul 4, 2013

There should be some extra checking in the file lib.php to see if there was a president assigned to the module :

Original :
$president = $DB->get_record('chairman_members', array('chairman_id' => $event->chairman_id, 'role_id' => 1));
$from = $DB->get_record('user', array('id' => $president->user_id));

Suggested change :
if($president = $DB->get_record('chairman_members', array('chairman_id' => $event->chairman_id, 'role_id' => 1))){
$from = $DB->get_record('user', array('id' => $president->user_id));
} else {
$from = get_admin();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant