WordPress.org

Make WordPress Core

Ticket #17375: 17375.diff

File 17375.diff, 1.6 KB (added by wonderboymusic, 5 months ago)
  • wp-includes/functions.php

     
    261261                return false; 
    262262        $token = $data[0]; 
    263263        switch ( $token ) { 
     264                case 'S' : 
    264265                case 's' : 
    265266                        if ( '"' !== $data[$length-2] ) 
    266267                                return false; 
    267268                case 'a' : 
     269                case 'C' : 
    268270                case 'O' : 
    269                         return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data ); 
     271                        return (bool) preg_match( "/^{$token}:[+]?[0-9]+:/s", $data ); 
    270272                case 'b' : 
    271273                case 'i' : 
    272274                case 'd' : 
    273                         return (bool) preg_match( "/^{$token}:[0-9.E-]+;\$/", $data ); 
     275                        return (bool) preg_match( "/^{$token}:[0-9.EeINF+-]+;\$/", $data ); 
    274276        } 
    275277        return false; 
    276278} 
     
    295297                return false; 
    296298        elseif ( ';' !== $data[$length-1] ) 
    297299                return false; 
    298         elseif ( $data[0] !== 's' ) 
     300        elseif ( $data[0] !== 's' && $data[0] !== 'S' ) 
    299301                return false; 
    300302        elseif ( '"' !== $data[$length-2] ) 
    301303                return false; 
     
    14371439/** 
    14381440 * Determine if a directory is writable. 
    14391441 * 
    1440  * This function is used to work around certain ACL issues  
     1442 * This function is used to work around certain ACL issues 
    14411443 * in PHP primarily affecting Windows Servers. 
    14421444 * 
    14431445 * @see win_is_writable() 
     
    14571459/** 
    14581460 * Workaround for Windows bug in is_writable() function 
    14591461 * 
    1460  * PHP has issues with Windows ACL's for determine if a  
     1462 * PHP has issues with Windows ACL's for determine if a 
    14611463 * directory is writable or not, this works around them by 
    14621464 * checking the ability to open files rather than relying 
    14631465 * upon PHP to interprate the OS ACL.