MDL-51673 messages: remove strict type check of int vs string

This commit is contained in:
Ben Kelada 2015-10-06 15:09:42 +11:00 committed by Jun Pataleta
parent 1b7bf43562
commit 42c0b0473c

View file

@ -1038,7 +1038,7 @@ function message_add_contact($contactid, $blocked=0) {
// Check if a record already exists as we may be changing blocking status.
if (($contact = $DB->get_record('message_contacts', array('userid' => $USER->id, 'contactid' => $contactid))) !== false) {
// Check if blocking status has been changed.
if ($contact->blocked !== $blocked) {
if ($contact->blocked != $blocked) {
$contact->blocked = $blocked;
$DB->update_record('message_contacts', $contact);