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

Login results in fatal PHP error on enrol/database connect failure

    XMLWordPrintable

    Details

    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      In moodle/enrol/database/enrol.php, version 1.27, a failure to connect to the database results in a fatal PHP error when an undefined variable is used as an object. $enroldb is known to be undefined by the encapulating if statement around lines 19 through 23.

      Suggested change for Line 21:
      < error_log('[ENROL_DB] Could not make a connection: '.$enroldb->ErrorMsg());

      > error_log('[ENROL_DB] Could not make a connection');

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              bluenovember Clinton Graham
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/Jan/07