Make WordPress Core


Ignore:
Timestamp:
10/31/2017 11:59:43 AM (7 years ago)
Author:
pento
Message:

Database: Restore numbered placeholders in wpdb::prepare().

[41496] removed support for numbered placeholders in queries send through wpdb::prepare(), which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to wpdb::prepare(), given the number of placeholders.

See #41925.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-tests-config-sample.php

    r41289 r42056  
    3939define( 'DB_COLLATE', '' );
    4040
     41/**#@+
     42 * Authentication Unique Keys and Salts.
     43 *
     44 * Change these to different unique phrases!
     45 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     46 */
     47define('AUTH_KEY',         'put your unique phrase here');
     48define('SECURE_AUTH_KEY',  'put your unique phrase here');
     49define('LOGGED_IN_KEY',    'put your unique phrase here');
     50define('NONCE_KEY',        'put your unique phrase here');
     51define('AUTH_SALT',        'put your unique phrase here');
     52define('SECURE_AUTH_SALT', 'put your unique phrase here');
     53define('LOGGED_IN_SALT',   'put your unique phrase here');
     54define('NONCE_SALT',       'put your unique phrase here');
     55
    4156$table_prefix  = 'wptests_';   // Only numbers, letters, and underscores please!
    4257
Note: See TracChangeset for help on using the changeset viewer.