Moodle

Undefined property $email notice from /admin/settings/server.php prior to login

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

With debugging on and prior to login, the front page displays

Notice: Undefined property: object::$email in /home/aborrow/workspace/MoodleHead/admin/settings/server.php on line 60

The code is attempting to get the user's email; however, there is no user. Should this be checked for? Is it worth checking?

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Yep did this today, thanks!

Show
Martin Dougiamas added a comment - Yep did this today, thanks!
Hide
Anthony Borrow added a comment -

Martin - I'm not sure why as the code you posted to fix this would seem to address the issue; however, now I am getting the following:

Notice: Undefined property: object::$email in /home/aborrow/workspace/MoodleHead/admin/settings/server.php on line 68

I would be curious what $USER is prior to logging in. Whatever it is it does not seem to have an email attribute. I'll see if I can figure out what might be happening.

I went ahead and re-opened the issue since it is still there; however, I still consider this to be pretty trivial. Best of luck as you get closer to releasing 1.9. Peace - Anthony

Show
Anthony Borrow added a comment - Martin - I'm not sure why as the code you posted to fix this would seem to address the issue; however, now I am getting the following: Notice: Undefined property: object::$email in /home/aborrow/workspace/MoodleHead/admin/settings/server.php on line 68 I would be curious what $USER is prior to logging in. Whatever it is it does not seem to have an email attribute. I'll see if I can figure out what might be happening. I went ahead and re-opened the issue since it is still there; however, I still consider this to be pretty trivial. Best of luck as you get closer to releasing 1.9. Peace - Anthony
Hide
Petr Škoda (skodak) added a comment -

this should be fixed now, please reopen if needed
thanks

Show
Petr Škoda (skodak) added a comment - this should be fixed now, please reopen if needed thanks
Hide
Anthony Borrow added a comment -

Skodak - I attempted to recreate and the issue indeed seems to be resolved. I'm going to go ahead and close it. Peace - Anthony

Show
Anthony Borrow added a comment - Skodak - I attempted to recreate and the issue indeed seems to be resolved. I'm going to go ahead and close it. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: