From aae957c47d3f63fdca0c543b9fcb66f8efa5e23f Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Thu, 12 Jul 2007 06:53:03 +0000 Subject: [PATCH] #134308 by dww. The DB API does not handle prefixes with '.' in them well; do not allow that at install time. --- install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.php b/install.php index c89b16d535e8..79ef2cf52928 100644 --- a/install.php +++ b/install.php @@ -316,8 +316,8 @@ function _install_settings_form_validate($db_prefix, $db_type, $db_user, $db_pas } // Verify the table prefix - if (!empty($db_prefix) && is_string($db_prefix) && !preg_match('/^[A-Za-z0-9_.]+$/', $db_prefix)) { - form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, underscores or dots.', array('%db_prefix' => $db_prefix)), 'error'); + if (!empty($db_prefix) && is_string($db_prefix) && !preg_match('/^[A-Za-z0-9_]+$/', $db_prefix)) { + form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters or underscores.', array('%db_prefix' => $db_prefix)), 'error'); } if (!empty($db_port) && !is_numeric($db_port)) {