diff --git a/user.inc.php b/user.inc.php index 59dc0003..98214ccb 100644 --- a/user.inc.php +++ b/user.inc.php @@ -713,9 +713,9 @@ function user_dupe_row($table, $key, $val, $newval) $keys = '`' . join('`,`', array_keys($i)) . '`'; $vals = join(',', array_values($i)); - $q = "INSERT INTO $table (?) VALUES (?)"; + $q = "INSERT INTO $table ($keys) VALUES ($vals)"; $r = $pdo->prepare($q); - $r->execute([$keys, $vals]); + $r->execute(); show_pdo_errors_if_any($pdo); $id = $pdo->lastInsertId(); @@ -867,7 +867,7 @@ function user_valid_user($user) function user_valid_password($pass) { /* Same as user, but allow more characters */ - $x = preg_match('/[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]/', $pass); + $x = preg_match('[^a-zA-Z0-9 ~!@#$%^&*()-_=+|;:,<.>/?]', $pass); /* If x==1, a match was found, and the input is bad */ if ($x == 1)