Making WordPress.org

Changeset 10002


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

Slack: Commit handler, add a user agent here too.

See r10001

File:
1 edited

Legend:

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

    r8311 r10002  
    6262
    6363                $url = $this->trac->get_commit_info_url( $this->id );
    64                 $contents = @file_get_contents( $url );
     64
     65                $context = stream_context_create( array(
     66                        'http' => array(
     67                                'user_agent' => 'WordPress.org Trac:Slack Notifications'
     68                        )
     69                ) );
     70
     71                $contents = @file_get_contents( $url, false, $context );
    6572                if ( false === $contents ) {
    6673                        $this->data = false;
Note: See TracChangeset for help on using the changeset viewer.