From 0307e1e62ddab00a934be797a11668b2b6028c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blon=C4=8F=C3=A1k?= Date: Mon, 4 Sep 2017 15:26:27 +0200 Subject: [PATCH] fixed - Only variables should be passed by reference --- include/classes/notification.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/classes/notification.class.php b/include/classes/notification.class.php index 15764c88..ffafcc78 100644 --- a/include/classes/notification.class.php +++ b/include/classes/notification.class.php @@ -150,7 +150,8 @@ class Notification extends Mail { } // Check if this user wants strType notifications $stmt = $this->mysqli->prepare("SELECT type FROM $this->tableSettings WHERE type IN (?, ?) AND active = 1 AND account_id = ?"); - if ($stmt && $stmt->bind_param('ssi', $strType, substr('push_'.$strType, 0, 15), $account_id) && $stmt->execute() && $result = $stmt->get_result()) { + $notStrType = substr('push_'.$strType, 0, 15); + if ($stmt && $stmt->bind_param('ssi', $strType, $notStrType, $account_id) && $stmt->execute() && $result = $stmt->get_result()) { $types = array_map(function($a){ return reset($a);}, $result->fetch_all(MYSQLI_ASSOC)); $stmt->close(); $result = true;