Making WordPress.org

Changeset 3072


Ignore:
Timestamp:
05/03/2016 02:10:07 PM (10 years ago)
Author:
ocean90
Message:

Slack: Don't remove the first line if the Trac mail is base64 encoded.

If the mail is base64 encoded the first line contains the title and is *not* empty.

Fixes #838.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/trac/comment-handler.php

    r3071 r3072  
    3030        function process_message() {
    3131                $lines = array_map( 'rtrim', $this->lines );
     32                $base64 = false;
    3233
    3334                // Trim off headers.
    … …  
    4950                }
    5051
    51                 if ( ! empty( $base64 ) ) {
     52                if ( $base64 ) {
    5253                        $lines = explode( "\n", base64_decode( implode( "\n", $lines ) ) );
    5354                }
    5455
    55                 // Remove empty line between headers and body.
    56                 array_shift( $lines );
     56                // Remove empty line between headers and body if not base64.
     57                if ( ! $base64 ) {
     58                        array_shift( $lines );
     59                }
    5760
    5861                $title = '';
Note: See TracChangeset for help on using the changeset viewer.