WordPress.org

Make WordPress Core

Changeset 25084


Ignore:
Timestamp:
08/22/13 15:28:01 (8 months ago)
Author:
SergeyBiryukov
Message:

Check if a locale category is an existing constant when restoring locale settings in Tests_DB::test_locale_floats(). props nofearinc. fixes #25118.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/tests/db.php

    r25002 r25084  
    8080            if ( false !== strpos( $locale_setting, '=' ) ) { 
    8181                list( $category, $locale ) = explode( '=', $locale_setting ); 
    82                 setlocale( constant( $category ), $locale ); 
     82                if ( defined( $category ) ) 
     83                    setlocale( constant( $category ), $locale ); 
    8384            } else { 
    8485                setlocale( LC_ALL, $locale_setting ); 
Note: See TracChangeset for help on using the changeset viewer.