Moodle

Notice: Undefined variable: type in /moodle/enrol/ldap/enrol.php on line 79

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7, 1.7.1
  • Fix Version/s: 1.7.2, 1.8.2, 1.9
  • Component/s: Enrolments
  • Labels:
    None
  • Environment:
    SLES 10; PHP Version 5.2; MySql 5.0.18; Ldap: eDirectory 8.7.8
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Undefined variable: type in /moodle/enrol/ldap/enrol.php on line 79
Fatal error: Cannot access empty property in /moodle/enrol/ldap/enrol.php on line 79

It appears that on line 79 the $type variable is used, but it is not defined until function call on line 131.

Line 79:
if ($course_obj->visible==0 && $user->{$type}[$course_obj->id] == 'ldap') {

Line 131:
function sync_enrolments($type, $enrol = false) {

Issue Links

Activity

Hide
James Rudd added a comment -

We are getting the exact same issue for some users. We are also running SLES 10, PHP 5.2, Apache 2.2 and LDAP: eDir 8.7.3.9.

Has affected a student and teacher.

I have not been able to deermine what seperates these users from others. For affected users the system shows no courses due to fatal error, even though student is definitely enrolled. However if I disable LDAP enrollment any courses they had previously been enrolled in show OK.

I have had to leave LDAP enroll disabled because of this bug, as this is the only way affected users can use Moodle.

Show
James Rudd added a comment - We are getting the exact same issue for some users. We are also running SLES 10, PHP 5.2, Apache 2.2 and LDAP: eDir 8.7.3.9. Has affected a student and teacher. I have not been able to deermine what seperates these users from others. For affected users the system shows no courses due to fatal error, even though student is definitely enrolled. However if I disable LDAP enrollment any courses they had previously been enrolled in show OK. I have had to leave LDAP enroll disabled because of this bug, as this is the only way affected users can use Moodle.
Hide
Iñaki Arenaza added a comment -

MDL-11098 has patches to fix this issue.

Show
Iñaki Arenaza added a comment - MDL-11098 has patches to fix this issue.
Hide
Iñaki Arenaza added a comment -

This is a duplicate of MDL-11098, which has been fixed. So closing now.

Thanks for the report

Show
Iñaki Arenaza added a comment - This is a duplicate of MDL-11098, which has been fixed. So closing now. Thanks for the report

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: