Skip to content

Commit 602f35f

Browse files
committed
Fix pass by reference error
1 parent e64724e commit 602f35f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/libraries/Packet.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -848,11 +848,9 @@ public function update() {
848848
$stmt->bindParam(':dt1', $this->created_datetime, PDO::PARAM_STR);
849849
$stmt->bindParam(':edit_count', $this->edited_count, PDO::PARAM_INT);
850850

851-
if ( is_null( $this->edited_datetime )) {
852-
$stmt->bindParam( ':dt2', null, PDO::PARAM_NULL );
853-
} else {
854-
$stmt->bindParam( ':dt2', $this->edited_datetime, PDO::PARAM_STR );
855-
}
851+
$stmt->bindParam(':dt2', $this->edited_datetime, (
852+
is_null($this->edited_datetime) ? PDO::PARAM_NULL : PDO::PARAM_STR
853+
));
856854

857855
$stmt->bindParam(
858856
':direction', $this->packet_direction_id, PDO::PARAM_INT

0 commit comments

Comments
 (0)