Skip to content

Commit

Permalink
MDL-28384 convert empty log urls to ''
Browse files Browse the repository at this point in the history
The problem is that the log table does not allow nulls, credit goes to Troy Williams.
  • Loading branch information
skodak committed Jul 24, 2011
1 parent 6884b59 commit 43b9db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/datalib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43b9db4

Please sign in to comment.