Check if a locale category is an existing constant when restoring locale settings in Tests_DB::test_locale_floats(). props nofearinc. fixes #25118.
git-svn-id: https://develop.svn.wordpress.org/trunk@25084 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ea9e40fed
commit
ac338fc070
@ -79,7 +79,8 @@ class Tests_DB extends WP_UnitTestCase {
|
||||
foreach ( $current_locales as $locale_setting ) {
|
||||
if ( false !== strpos( $locale_setting, '=' ) ) {
|
||||
list( $category, $locale ) = explode( '=', $locale_setting );
|
||||
setlocale( constant( $category ), $locale );
|
||||
if ( defined( $category ) )
|
||||
setlocale( constant( $category ), $locale );
|
||||
} else {
|
||||
setlocale( LC_ALL, $locale_setting );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user