From ebd1ad3180d91641bfedc0ffee07d4fa6c219ea3 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 30 May 2014 08:03:55 +0000 Subject: [PATCH] Unset the prepared statement --- app/destinations/destination_edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 252e2639a8..d11abb701f 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -85,12 +85,13 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "where destination_number = '".$destination_number."' "; $prep_statement = $db->prepare($sql); if ($prep_statement) { - $prep_statement->execute(); + $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); if ($row['num_rows'] > 0) { $msg .= $text['message-duplicate']."
\n"; } } + unset($prep_statement); } //show the message