WordPress.org

Make WordPress Core

Ticket #19970: 19970.diff

File 19970.diff, 1014 bytes (added by rmarks, 4 years ago)
  • wp-includes/wp-db.php

     
    572572         */ 
    573573        function set_prefix( $prefix, $set_table_names = true ) { 
    574574 
     575                if ( empty($prefix) ) 
     576                        return new WP_Error('empty_db_prefix', 'Empty database prefix' ); 
     577 
    575578                if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) 
    576579                        return new WP_Error('invalid_db_prefix', 'Invalid database prefix' ); 
    577580 
  • wp-config-sample.php

     
    5757 * WordPress Database Table prefix. 
    5858 * 
    5959 * You can have multiple installations in one database if you give each a unique 
    60  * prefix. Only numbers, letters, and underscores please! 
     60 * prefix. Only numbers, letters, and underscores please!  An empty table prefix 
     61 * is not supported. 
    6162 */ 
    6263$table_prefix  = 'wp_'; 
    6364