Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-8346

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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) {

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dougiamas Martin Dougiamas
              Reporter:
              rudd_j James Rudd
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07