Permalink
Browse files

Test for empty dataset to suppress a warning

  • Loading branch information...
1 parent c5fbfaf commit e0033fb83c09494188dbbffdfa1dcae7086df3d8 donal72 committed Nov 1, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 auth/mnet/auth.php
View
@@ -289,7 +289,7 @@ function confirm_mnet_session($token, $remotewwwroot) {
// add the remote user to the database if necessary, and if allowed
// TODO: refactor into a separate function
- if (! $localuser->id) {
+ if (empty($localuser) || ! $localuser->id) {
if (empty($this->config->auto_add_remote_users)) {
error(get_string('nolocaluser', 'mnet'));
}

0 comments on commit e0033fb

Please sign in to comment.