mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -15,12 +15,12 @@ class TracTickets {
|
||||
*/
|
||||
public static function isTracTicketClosed( $trac_url, $ticket_id ) {
|
||||
if ( ! extension_loaded( 'openssl' ) ) {
|
||||
$trac_url = preg_replace( "/^https:/", "http:", $trac_url );
|
||||
$trac_url = preg_replace( '/^https:/', 'http:', $trac_url );
|
||||
}
|
||||
|
||||
if ( ! isset( self::$trac_ticket_cache[ $trac_url ] ) ) {
|
||||
// In case you're running the tests offline, keep track of open tickets.
|
||||
$file = DIR_TESTDATA . '/.trac-ticket-cache.' . str_replace( array( 'http://', 'https://', '/' ), array( '', '', '-' ), rtrim( $trac_url, '/' ) );
|
||||
$file = DIR_TESTDATA . '/.trac-ticket-cache.' . str_replace( array( 'http://', 'https://', '/' ), array( '', '', '-' ), rtrim( $trac_url, '/' ) );
|
||||
$tickets = @file_get_contents( $trac_url . '/query?status=%21closed&format=csv&col=id' );
|
||||
// Check if our HTTP request failed.
|
||||
if ( false === $tickets ) {
|
||||
@@ -37,7 +37,7 @@ class TracTickets {
|
||||
$tickets = trim( $tickets );
|
||||
file_put_contents( $file, $tickets );
|
||||
}
|
||||
$tickets = explode( "\r\n", $tickets );
|
||||
$tickets = explode( "\r\n", $tickets );
|
||||
self::$trac_ticket_cache[ $trac_url ] = $tickets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user