Skip to content

Commit a24422e

Browse files
committed
Fix pass by reference to BindParam
1 parent b5d5db8 commit a24422e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libraries/User.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,8 @@ public function setVerified() {
708708
`verified_datetime` = :dt
709709
WHERE `id` = :user_id;
710710
');
711-
$stmt->bindParam(
712-
':dt', $verified_datetime->format( 'Y-m-d H:i:s' ), PDO::PARAM_STR
713-
);
711+
$dt = $verified_datetime->format( 'Y-m-d H:i:s' );
712+
$stmt->bindParam(':dt', $dt, PDO::PARAM_STR); // must be byref
714713
$stmt->bindParam(':bits', $options_bitmask, PDO::PARAM_INT);
715714
$stmt->bindParam(':user_id', $this->id, PDO::PARAM_INT);
716715
$successful = $stmt->execute();

0 commit comments

Comments
 (0)