Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7
-
Component/s: Database SQL/XMLDB, Enrolments
-
Labels:None
-
Database:Oracle
-
Affected Branches:MOODLE_17_STABLE
-
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
Description
From .../lib/xmldb/classes/generators/oci8po/oci9po.class.php:
// To define the default to set for NOT NULLs CHARs without default (null=do nothing)
// Using this whitespace here because Oracle doesn't distinguish empty and null!
This means courses get a default value for the (interactive) enrolment plugin that is a white space, and not and empty string, when we use the 'Site Default' option. Later, in .../enrol/enrol.class.php we do:
function factory($enrol = '') {
global $CFG;
if (!$enrol)
So we test whether $enrol is empty or not, to use the default interactive enrolment plugin. But this breaks with Oracle, as $enrol is not empty but has a single white space character. So we end up using an enrolment plugin called ' ', which doesn't exist and generates a run-time error when we do the require_once() a few lines below.
I'd have a cursory look, and I'd say there are other places where such assuption is made (emtpy field === default value), which totally breaks when using Oracle.
(I'd like to thank Mikel Kortabarria, our local Oracle guru, for tracking down this bug .
Saludos. Iñaki.
Attachments
Issue Links
- is duplicated by
-
MDL-7634 Whitespace in filename prevents instantiation of enrolment plugin
-
- Closed
-