Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Do
-
3.3
-
None
-
MOODLE_33_STABLE
Description
When the PDO connection string results in failing connection, Moodle doesn't detect it and results in an incomphrensible error on attemtping to login:
Exception - Call to a member function prepare() on boolean
|
|
More information about this error
|
|
×Debug info:
|
Error code: generalexceptionmessage
|
×Stack trace:
|
line 468 of /lib/adodb/drivers/adodb-pdo.inc.php: Error thrown
|
line 1252 of /lib/adodb/adodb.inc.php: call to ADODB_pdo->_query()
|
line 1230 of /lib/adodb/adodb.inc.php: call to ADOConnection->_Execute()
|
line 115 of /auth/db/auth.php: call to ADOConnection->Execute()
|
line 4312 of /lib/moodlelib.php: call to auth_plugin_db->user_login()
|
line 154 of /login/index.php: call to authenticate_user_login()
|
Steps to reproduce:
- Add external database auth plugin
- Set the type to pdo and set the connection string to something which will cause it to fail, eg.:
- Set the host to 'pgsql:host=localhost;port=5432;dbname=enroltest;user= enroltest;password=enroltest'
- Don't set the username and password in the auth plugin settings
- Try to login with a junk username
Attachments
Issue Links
- Discovered while testing
-
MDLQA-10962 CLONE - A PDO-compatible DB server may be used for external DB authentication and enrolment
-
- Passed
-
- is a regression caused by
-
MDL-57686 add support for PDO databases in auth_db
-
- Closed
-