From fab930b0632ba74b507f33cd445c7b2406d5434a Mon Sep 17 00:00:00 2001 From: maorib24 <15958009+novecode@users.noreply.github.com> Date: Thu, 15 Feb 2018 11:16:24 +0100 Subject: [PATCH] Fixed mysql client binding wrong delay value in PHP 7.2 --- src/Client/Delay/MySQL/Base.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Client/Delay/MySQL/Base.php b/src/Client/Delay/MySQL/Base.php index 59823a2..6a654b1 100644 --- a/src/Client/Delay/MySQL/Base.php +++ b/src/Client/Delay/MySQL/Base.php @@ -55,7 +55,7 @@ public function reset($newDelay = self::RESET_NEW_DELAY) WHERE base = :base AND userAgent = :userAgent; SQL ); - $query->bindValue('base', $this->base, \PDO::PARAM_INT); + $query->bindValue('base', $this->base, \PDO::PARAM_STR); $query->bindValue('userAgent', $this->userAgent, \PDO::PARAM_STR); return $query->execute(); } @@ -67,9 +67,9 @@ public function reset($newDelay = self::RESET_NEW_DELAY) lastDelay = :delay * 1000000; SQL ); - $query->bindValue('base', $this->base, \PDO::PARAM_INT); + $query->bindValue('base', $this->base, \PDO::PARAM_STR); $query->bindValue('userAgent', $this->userAgent, \PDO::PARAM_STR); - $query->bindValue('delay', $newDelay, \PDO::PARAM_INT | \PDO::PARAM_STR); + $query->bindValue('delay', $newDelay, \PDO::PARAM_INT); return $query->execute(); } @@ -121,7 +121,7 @@ private function increment() ); $query->bindValue('base', $this->base, \PDO::PARAM_STR); $query->bindValue('userAgent', $this->userAgent, \PDO::PARAM_STR); - $query->bindValue('delay', $this->delay, \PDO::PARAM_INT | \PDO::PARAM_STR); + $query->bindValue('delay', $this->delay, \PDO::PARAM_INT); return $query->execute(); }