Skip to content

Commit 0307e1e

Browse files
committed
fixed - Only variables should be passed by reference
1 parent bcfd7cf commit 0307e1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/classes/notification.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public function sendNotification($account_id, $strType, $aMailData) {
150150
}
151151
// Check if this user wants strType notifications
152152
$stmt = $this->mysqli->prepare("SELECT type FROM $this->tableSettings WHERE type IN (?, ?) AND active = 1 AND account_id = ?");
153-
if ($stmt && $stmt->bind_param('ssi', $strType, substr('push_'.$strType, 0, 15), $account_id) && $stmt->execute() && $result = $stmt->get_result()) {
153+
$notStrType = substr('push_'.$strType, 0, 15);
154+
if ($stmt && $stmt->bind_param('ssi', $strType, $notStrType, $account_id) && $stmt->execute() && $result = $stmt->get_result()) {
154155
$types = array_map(function($a){ return reset($a);}, $result->fetch_all(MYSQLI_ASSOC));
155156
$stmt->close();
156157
$result = true;

0 commit comments

Comments
 (0)