Skip to content

Commit

Permalink
Type check
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Mar 30, 2022
1 parent aa18ef9 commit 72c0df1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/addmsguser.php
Expand Up @@ -29,7 +29,7 @@

erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.validstatus_chat',array('chat' => & $chat, 'valid_statuses' => & $validStatuses));

if ($chat->hash == $payload['hash'] && (in_array($chat->status,$validStatuses)) && !in_array($chat->status_sub, array(erLhcoreClassModelChat::STATUS_SUB_SURVEY_COMPLETED, erLhcoreClassModelChat::STATUS_SUB_USER_CLOSED_CHAT, erLhcoreClassModelChat::STATUS_SUB_SURVEY_SHOW, erLhcoreClassModelChat::STATUS_SUB_CONTACT_FORM))) // Allow add messages only if chat is active
if ($chat->hash === $payload['hash'] && (in_array($chat->status,$validStatuses)) && !in_array($chat->status_sub, array(erLhcoreClassModelChat::STATUS_SUB_SURVEY_COMPLETED, erLhcoreClassModelChat::STATUS_SUB_USER_CLOSED_CHAT, erLhcoreClassModelChat::STATUS_SUB_SURVEY_SHOW, erLhcoreClassModelChat::STATUS_SUB_CONTACT_FORM))) // Allow add messages only if chat is active
{
$msgText = preg_replace('/\[html\](.*?)\[\/html\]/ms','',$payload['msg']);

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/fetchmessage.php
Expand Up @@ -16,7 +16,7 @@

$chat = erLhcoreClassModelChat::fetch($requestPayload['id']);

if ($chat instanceof erLhcoreClassModelChat && $chat->hash == $requestPayload['hash'])
if ($chat instanceof erLhcoreClassModelChat && $chat->hash === $requestPayload['hash'])
{
$msg = erLhcoreClassModelmsg::fetch($requestPayload['msg_id']);

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/fetchmessages.php
Expand Up @@ -34,7 +34,7 @@

$responseArray = array('status' => erLhcoreClassModelChat::STATUS_CLOSED_CHAT, 'status_sub' => erLhcoreClassModelChat::STATUS_SUB_DEFAULT);

if (is_object($chat) && $chat->hash == $requestPayload['hash'])
if (is_object($chat) && $chat->hash === $requestPayload['hash'])
{
erLhcoreClassChat::setTimeZoneByChat($chat);
$chat->updateIgnoreColumns = array('last_msg_id');
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/getmessagesnippet.php
Expand Up @@ -16,7 +16,7 @@

$chat = erLhcoreClassModelChat::fetch($requestPayload['id']);

if ($chat instanceof erLhcoreClassModelChat && $chat->hash == $requestPayload['hash'])
if ($chat instanceof erLhcoreClassModelChat && $chat->hash === $requestPayload['hash'])
{

$msg = erLhcoreClassModelmsg::findOne(array('limit' => 1, 'sort' => 'id DESC', 'filtergt' => array('user_id' => 0), 'filter' => array('chat_id' => $chat->id)));
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/initchat.php
Expand Up @@ -29,7 +29,7 @@

erLhcoreClassChat::setTimeZoneByChat($chat);

if ($chat->hash == $requestPayload['hash'])
if ($chat->hash === $requestPayload['hash'])
{
// User online
if ($chat->user_status != 0) {
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/sendmailsettings.php
Expand Up @@ -6,7 +6,7 @@

$chat = erLhcoreClassModelChat::fetch($Params['user_parameters']['chat_id']);

if ($chat instanceof erLhcoreClassModelChat && $chat->hash == $Params['user_parameters']['hash'])
if ($chat instanceof erLhcoreClassModelChat && $chat->hash === $Params['user_parameters']['hash'])
{
if ($Params['user_parameters_unordered']['action'] == 'send') {

Expand Down
2 changes: 1 addition & 1 deletion lhc_web/modules/lhwidgetrestapi/uisettings.php
Expand Up @@ -16,7 +16,7 @@

erLhcoreClassChat::setTimeZoneByChat($chat);

if ($chat->hash == $requestPayload['hash'])
if ($chat->hash === $requestPayload['hash'])
{
$outputResponse = array(
'operator' => 'operator',
Expand Down

0 comments on commit 72c0df1

Please sign in to comment.