Skip to:
Content

BuddyPress.org

Changeset 1047


Ignore:
Timestamp:
02/10/2009 05:22:57 PM (16 years ago)
Author:
apeatling
Message:

Adding function exists checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1045 r1047  
    12881288 */
    12891289function bp_core_ucfirst( $str ) {
    1290     $fc = mb_strtoupper( mb_substr( $str, 0, 1 ) );
    1291     return $fc.mb_substr( $str, 1 );
     1290    if ( function_exists( 'mb_strtoupper' ) && function_exists( 'mb_substr' ) ) {
     1291        $fc = mb_strtoupper( mb_substr( $str, 0, 1 ) );
     1292        return $fc.mb_substr( $str, 1 );   
     1293    } else {
     1294        return ucfirst( $str );
     1295    }
    12921296}
    12931297
Note: See TracChangeset for help on using the changeset viewer.