Force status to integer value before writing database.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 5 Mar 2013 21:13:20 +0000 (22:13 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 5 Mar 2013 21:13:20 +0000 (22:13 +0100)
includes/db/sql_functions.inc

index 85a25137df35b6b0997766b38bd4781421366f18..febc3af824e4f1246be0f9659a7a6aced26616ab 100644 (file)
@@ -55,7 +55,7 @@ function cancel_transaction()
 //
 function update_record_status($id, $status, $table, $key) {
        $sql = "UPDATE ".TB_PREF.$table." SET inactive = "
-               . db_escape($status)." WHERE $key=".db_escape($id);
+               . ((int)$status)." WHERE $key=".db_escape($id);
                
        db_query($sql, "Can't update record status");
 }