Ticket #40109: 40109.patch
File 40109.patch, 1.6 KB (added by , 8 years ago) |
---|
-
tests/phpunit/includes/utils.php
157 157 } 158 158 159 159 function parse($in) { 160 $parse = xml_parse($this->xml, $in, sizeof($in));160 $parse = xml_parse($this->xml, $in, true); 161 161 if (!$parse) { 162 162 trigger_error(sprintf("XML error: %s at line %d", 163 163 xml_error_string(xml_get_error_code($this->xml)), … … 408 408 */ 409 409 function benchmark_pcre_backtracking( $pattern, $subject, $strategy ) { 410 410 $saved_config = ini_get( 'pcre.backtrack_limit' ); 411 411 412 412 // Attempt to prevent PHP crashes. Adjust these lower when needed. 413 413 if ( version_compare( phpversion(), '5.4.8', '>' ) ) { 414 414 $limit = 1000000; … … 420 420 for( $i = 4; $i <= $limit; $i *= 2 ) { 421 421 422 422 ini_set( 'pcre.backtrack_limit', $i ); 423 423 424 424 switch( $strategy ) { 425 425 case 'split': 426 426 preg_split( $pattern, $subject ); -
tests/phpunit/tests/import/base.php
23 23 protected function _import_wp( $filename, $users = array(), $fetch_files = true ) { 24 24 $importer = new WP_Import(); 25 25 $file = realpath( $filename ); 26 assert('!empty($file)');27 assert('is_file($file)');28 26 27 $this->assertTrue( ! empty( $file ), 'Path to import file is empty.' ); 28 $this->assertTrue( is_file( $file ), 'Import file is not a file.' ); 29 29 30 $authors = $mapping = $new = array(); 30 31 $i = 0; 31 32