Prevent Oracle to fail when inserting records with log->info empty
(will be solved once we got all those NOT NULL fields fixed)
This commit is contained in:
@@ -1292,6 +1292,12 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
|
||||
|
||||
if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++; $PERF->logwrites++;};
|
||||
|
||||
if ($CFG->type = 'oci8po') {
|
||||
if (empty($info)) {
|
||||
$info = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$result = $db->Execute('INSERT INTO '. $CFG->prefix .'log (time, userid, course, ip, module, cmid, action, url, info)
|
||||
VALUES (' . "'$timenow', '$userid', '$courseid', '$REMOTE_ADDR', '$module', '$cm', '$action', '$url', '$info')");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user