MDL-51673 messages: remove strict type check of int vs string
This commit is contained in:
+1
-1
@@ -1028,7 +1028,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user