WordPress.org

Make WordPress Core

Ticket #12503: is_osx.diff

File is_osx.diff, 1.1 KB (added by technosailor, 6 years ago)
  • wp-includes/vars.php

     
    8282 */ 
    8383$is_iis7 = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/7.') !== false); 
    8484 
     85/** 
     86 * Whether the server software is OS X 
     87 * @global bool $is_osx 
     88 */ 
     89$is_osx = (strpos(php_uname( 's' ), 'Darwin') !== false); 
    8590 
    8691?> 
     92 No newline at end of file 
  • wp-includes/formatting.php

     
    14771477 * @return string|bool Either false or the valid email address. 
    14781478 */ 
    14791479function is_email( $email, $check_dns = false ) { 
     1480         
     1481        // OS X server is wonky with checkdnsrr - specifically on registrations. Overrides $check_dns if true 
     1482        global $is_osx; 
     1483         
     1484        if( $is_osx ) 
     1485                $check_dns = false; 
     1486         
    14801487        // Test for the minimum length the email can be 
    14811488        if ( strlen( $email ) < 3 ) { 
    14821489                return apply_filters( 'is_email', false, $email, 'email_too_short' );