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:
Gary Pendergast
2017-11-30 23:09:33 +00:00
parent ec6a089f98
commit 8f95800d52
1103 changed files with 105978 additions and 78184 deletions
+3 -3
View File
@@ -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;
}