From 602f35fed8fba31cd8731ee91918267e3a946eca Mon Sep 17 00:00:00 2001 From: Carl Bennett Date: Sat, 25 Jan 2020 15:16:44 -0600 Subject: [PATCH] Fix pass by reference error --- src/libraries/Packet.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libraries/Packet.php b/src/libraries/Packet.php index 84ba1a1d..d5c9b04c 100644 --- a/src/libraries/Packet.php +++ b/src/libraries/Packet.php @@ -848,11 +848,9 @@ public function update() { $stmt->bindParam(':dt1', $this->created_datetime, PDO::PARAM_STR); $stmt->bindParam(':edit_count', $this->edited_count, PDO::PARAM_INT); - if ( is_null( $this->edited_datetime )) { - $stmt->bindParam( ':dt2', null, PDO::PARAM_NULL ); - } else { - $stmt->bindParam( ':dt2', $this->edited_datetime, PDO::PARAM_STR ); - } + $stmt->bindParam(':dt2', $this->edited_datetime, ( + is_null($this->edited_datetime) ? PDO::PARAM_NULL : PDO::PARAM_STR + )); $stmt->bindParam( ':direction', $this->packet_direction_id, PDO::PARAM_INT