Make WordPress Core


Ignore:
Timestamp:
09/04/2017 07:29:50 PM (7 years ago)
Author:
ocean90
Message:

I18N: Allow numbers in locales during installation.

The current regex was a bit to strict for locales like pt_PT_ao90 which were already supported by wp_get_installed_translations().

Fixes #41794.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r41289 r41335  
    106106$language = '';
    107107if ( ! empty( $_REQUEST['language'] ) ) {
    108     $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     108    $language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
    109109} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
    110110    $language = $GLOBALS['wp_local_package'];
Note: See TracChangeset for help on using the changeset viewer.