mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Fixed when $cm is NULL, postgres still reports error.
This commit is contained in:
parent
ea62bb7695
commit
7a5b1fc555
1 changed files with 1 additions and 1 deletions
|
@ -2678,7 +2678,7 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue