Make WordPress Core

Ticket #40109: 40109.patch

File 40109.patch, 1.6 KB (added by ocean90, 8 years ago)
  • tests/phpunit/includes/utils.php

     
    157157        }
    158158
    159159        function parse($in) {
    160                 $parse = xml_parse($this->xml, $in, sizeof($in));
     160                $parse = xml_parse($this->xml, $in, true);
    161161                if (!$parse) {
    162162                        trigger_error(sprintf("XML error: %s at line %d",
    163163                        xml_error_string(xml_get_error_code($this->xml)),
     
    408408 */
    409409function benchmark_pcre_backtracking( $pattern, $subject, $strategy ) {
    410410        $saved_config = ini_get( 'pcre.backtrack_limit' );
    411        
     411
    412412        // Attempt to prevent PHP crashes.  Adjust these lower when needed.
    413413        if ( version_compare( phpversion(), '5.4.8', '>' ) ) {
    414414                $limit = 1000000;
     
    420420        for( $i = 4; $i <= $limit; $i *= 2 ) {
    421421
    422422                ini_set( 'pcre.backtrack_limit', $i );
    423                
     423
    424424                switch( $strategy ) {
    425425                case 'split':
    426426                        preg_split( $pattern, $subject );
  • tests/phpunit/tests/import/base.php

     
    2323        protected function _import_wp( $filename, $users = array(), $fetch_files = true ) {
    2424                $importer = new WP_Import();
    2525                $file = realpath( $filename );
    26                 assert('!empty($file)');
    27                 assert('is_file($file)');
    2826
     27                $this->assertTrue( ! empty( $file ), 'Path to import file is empty.' );
     28                $this->assertTrue( is_file( $file ), 'Import file is not a file.' );
     29
    2930                $authors = $mapping = $new = array();
    3031                $i = 0;
    3132