Make WordPress Core

Changeset 4695 for trunk/wp-settings.php


Ignore:
Timestamp:
01/07/2007 09:41:32 AM (19 years ago)
Author:
markjaquith
Message:

Exit gracefully with a warning if the table_prefix uses disallowed chars. fixes #3537

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r4648 r4695  
    100100// $table_prefix is deprecated as of 2.1
    101101$wpdb->prefix = $table_prefix;
     102
     103if ( preg_match('|[^a-z0-9_]|i', $wpdb->prefix) && !file_exists(ABSPATH . 'wp-content/db.php') )
     104    die(__('<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'));
    102105
    103106// Table names
Note: See TracChangeset for help on using the changeset viewer.