]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-6760 - cannot insert the string 'null' into the database. You can now. Merged...
authortjhunt <tjhunt>
Tue, 17 Oct 2006 15:58:09 +0000 (15:58 +0000)
committertjhunt <tjhunt>
Tue, 17 Oct 2006 15:58:09 +0000 (15:58 +0000)
lib/setup.php

index c23a806f4b81ebcfe6149b721e6b663e936dc6fa..ed9fdca17b54e6604a549baf76bd23235203ed50 100644 (file)
@@ -119,6 +119,10 @@ global $HTTPSPAGEREQUIRED;
 
     $db = &ADONewConnection($CFG->dbtype);
 
+    // See MDL-6760 for why this is necessary. In Moodle 1.8, once we start using NULLs properly,
+    // we probably want to change this value to ''.
+    $db->null2null = 'A long random string that will never, ever match something we want to insert into the database, I hope. \'';
+
     error_reporting(0);  // Hide errors
 
     if (!isset($CFG->dbpersist) or !empty($CFG->dbpersist)) {    // Use persistent connection (default)