Fixed when $cm is NULL, postgres still reports error.

This commit is contained in:
patrickslee 2005-07-18 22:21:56 +00:00
parent ea62bb7695
commit 7a5b1fc555

View file

@ -2678,7 +2678,7 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
global $db, $CFG, $USER; global $db, $CFG, $USER;
if ($cm === '') { // postgres won't translate empty string to its default if ($cm === '' || is_null($cm)) { // postgres won't translate empty string to its default
$cm = 0; $cm = 0;
} }