Making WordPress.org

Changeset 10001


Ignore:
Timestamp:
07/03/2020 03:43:53 AM (6 years ago)
Author:
dd32
Message:

Slack: Add a user-agent when communicating with Trac.

This should fix the New Ticket notifications in #core not expanding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/ticket.php

    r8176 r10001  
    6868            $this->id
    6969        );
    70         $contents = @file_get_contents( $url );
     70
     71        $context = stream_context_create( array(
     72            'http' => array(
     73                'user_agent' => 'WordPress.org Trac:Slack Notifications'
     74            )
     75        ) );
     76
     77        $contents = @file_get_contents( $url, false, $context );
    7178        if ( $contents === false ) {
    7279            $this->data = false;
Note: See TracChangeset for help on using the changeset viewer.