From a24422ef95e183cedb84fce8e99be6f548224b9b Mon Sep 17 00:00:00 2001 From: Carl Bennett Date: Fri, 23 Aug 2019 06:32:02 +0000 Subject: [PATCH] Fix pass by reference to BindParam --- src/libraries/User.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libraries/User.php b/src/libraries/User.php index 15214aa0..377fff01 100644 --- a/src/libraries/User.php +++ b/src/libraries/User.php @@ -708,9 +708,8 @@ public function setVerified() { `verified_datetime` = :dt WHERE `id` = :user_id; '); - $stmt->bindParam( - ':dt', $verified_datetime->format( 'Y-m-d H:i:s' ), PDO::PARAM_STR - ); + $dt = $verified_datetime->format( 'Y-m-d H:i:s' ); + $stmt->bindParam(':dt', $dt, PDO::PARAM_STR); // must be byref $stmt->bindParam(':bits', $options_bitmask, PDO::PARAM_INT); $stmt->bindParam(':user_id', $this->id, PDO::PARAM_INT); $successful = $stmt->execute();