diff --git a/include/classes/notification.class.php b/include/classes/notification.class.php index c1807dd9..396072c6 100644 --- a/include/classes/notification.class.php +++ b/include/classes/notification.class.php @@ -23,8 +23,16 @@ class Notification extends Mail { $data = json_encode($aData); $stmt = $this->mysqli->prepare("SELECT id FROM $this->table WHERE data = ? AND active = 1 LIMIT 1"); if ($stmt && $stmt->bind_param('s', $data) && $stmt->execute() && $stmt->store_result() && $stmt->num_rows == 1) - return true; - return $this->sqlError('E0041'); + { + return true; + } + + if( $stmt->errno ) + { + return $this->sqlError(); + } + + return false; } /**