MDL-28384 convert empty log urls to ''

The problem is that the log table does not allow nulls, credit goes to Troy Williams.
This commit is contained in:
Petr Skoda
2011-07-24 14:09:11 +02:00
parent ac30618786
commit 3687ab70bc
+2
View File
@@ -1662,6 +1662,8 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
$info = $info;
if (!empty($url)) { // could break doing html_entity_decode on an empty var.
$url = html_entity_decode($url);
} else {
$url = '';
}
// Restrict length of log lines to the space actually available in the