Ticket #12283: 12283.testsuite.patch

File 12283.testsuite.patch, 568 bytes (added by hakre, 3 years ago)

Patch for the testuite / wp-test.php

  • wp-test.php

     
    6868// initialize wp 
    6969define('WP_INSTALLING', 1); 
    7070$_SERVER['PATH_INFO'] = $_SERVER['SCRIPT_NAME']; // prevent a warning from some sloppy code in wp-settings.php 
     71foreach ( array( 'HTTP_HOST', 'REQUEST_URI', 'SERVER_SOFTWARE' ) as $var ) // prevent more therin 
     72        if ( !isset($_SERVER[$var]) ) 
     73                $_SERVER[$var] = ''; 
     74 
    7175require_once(ABSPATH.'wp-settings.php'); 
    7276 
    7377// Allow tests to override wp_die