mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-51673 messages: remove strict type check of int vs string
This commit is contained in:
parent
1b7bf43562
commit
42c0b0473c
1 changed files with 1 additions and 1 deletions
|
@ -1038,7 +1038,7 @@ function message_add_contact($contactid, $blocked=0) {
|
||||||
// Check if a record already exists as we may be changing blocking status.
|
// 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) {
|
if (($contact = $DB->get_record('message_contacts', array('userid' => $USER->id, 'contactid' => $contactid))) !== false) {
|
||||||
// Check if blocking status has been changed.
|
// Check if blocking status has been changed.
|
||||||
if ($contact->blocked !== $blocked) {
|
if ($contact->blocked != $blocked) {
|
||||||
$contact->blocked = $blocked;
|
$contact->blocked = $blocked;
|
||||||
$DB->update_record('message_contacts', $contact);
|
$DB->update_record('message_contacts', $contact);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue