Issue Details (XML | Word | Printable)

Key: MDL-15808
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Nicolas Connault
Reporter: Andrei Bautu
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

MySQLi connection hardcoded

Created: 24/Jul/08 05:49 PM   Updated: 25/Jul/08 04:47 PM
Component/s: Other
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File 200807241248-moodle.patch (2 kB)


Database: Any
Participants: Andrei Bautu, Nicolas Connault and Petr Škoda (skodak)
Security Level: None
Resolved date: 25/Jul/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
\lib\simpletest\fixtures\gradetest.php hardcodes a mysqli_adodb connection. Should use the driver type and family from the $CFG file. Patch attached.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nicolas Connault added a comment - 24/Jul/08 06:09 PM
Thanks Andrei, applying now.

Nicolas Connault added a comment - 24/Jul/08 08:22 PM
Applied your patch. It fixes the issue, but there is still a fatal error in the closing block. For some reason, running the unit tests in the lib/ folder changes the global $DB variable to NULL. I haven't pinpointed the source yet.

Andrei Bautu added a comment - 24/Jul/08 10:04 PM
The $DB = null was happening before that. It happened to me in events tests on MySQL. I also tried to find out why. I'll keep you informed if I found something.

Petr Škoda (skodak) added a comment - 25/Jul/08 03:41 AM
1/ oh, we can not have prefix "mdl_unittest_" this can not work on for all supported databases
2/ the connect is also missing dboptions parameter

Nicolas Connault added a comment - 25/Jul/08 04:47 PM
Fixed these two points, thanks for your review, Petr.