Skip to content

Commit

Permalink
MDL-34535 message: userto should use is_number instead of is_init
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Aug 14, 2012
1 parent c36de79 commit 9b18d9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/messagelib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function message_send($eventdata) {
//TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry //TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry
$DB->transactions_forbidden(); $DB->transactions_forbidden();


if (is_int($eventdata->userto)) { if (is_number($eventdata->userto)) {
$eventdata->userto = $DB->get_record('user', array('id' => $eventdata->userto)); $eventdata->userto = $DB->get_record('user', array('id' => $eventdata->userto));
} }
if (is_int($eventdata->userfrom)) { if (is_int($eventdata->userfrom)) {
Expand Down

0 comments on commit 9b18d9c

Please sign in to comment.