diff --git a/all-in-one-wp-security/admin/wp-security-database-menu.php b/all-in-one-wp-security/admin/wp-security-database-menu.php index 04ee422..e3c6a9c 100644 --- a/all-in-one-wp-security/admin/wp-security-database-menu.php +++ b/all-in-one-wp-security/admin/wp-security-database-menu.php @@ -452,7 +452,9 @@ function change_db_prefix($table_old_prefix, $table_new_prefix) foreach ($config_contents as $line_num => $line) { $no_ws_line = preg_replace( '/\s+/', '', $line ); //Strip white spaces if(strpos($no_ws_line, $prefix_match_string) !== FALSE){ - $config_contents[$line_num] = str_replace($table_old_prefix, $table_new_prefix, $line); + $prefix_parts = explode("=",$config_contents[$line_num]); + $prefix_parts[1] = str_replace($table_old_prefix, $table_new_prefix, $prefix_parts[1]); + $config_contents[$line_num] = implode("=",$prefix_parts); break; } }