Skip to content

Commit 0c5c82c

Browse files
authored
Merge pull request #1013 from SmoKE585/patch-8
Fix warning msg
2 parents 95b34ff + 5cb8ffc commit 0c5c82c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/module.class.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,9 @@ public function sendnotification($str, $type = 'default')
846846
return json_encode(array('status' => false, 'error' => 'More than 10 notifications in the unread status.'));
847847
}
848848

849-
$ifExest = SQLSelectOne("SELECT ID FROM `plugins_noty` WHERE `MESSAGE` = '".$str."' AND `READ` = '0'")['ID'];
850-
if($ifExest['ID']) {
849+
$ifExest = SQLSelectOne("SELECT ID FROM `plugins_noty` WHERE `MESSAGE` = '".$str."' AND `READ` = '0'");
850+
851+
if(!empty($ifExest) && is_array($ifExest)) {
851852
return json_encode(array('status' => false, 'error' => 'Such a record already exists. ID - '.$ifExest['ID'], 'id' => $ifExest['ID']));
852853
}
853854

0 commit comments

Comments
 (0)