WordPress.org

Make WordPress Core

Changeset 5761


Ignore:
Timestamp:
06/26/2007 06:06:17 PM (13 years ago)
Author:
markjaquith
Message:

strpos() is "haystack,needle", not "needle,haystack" Props pishmishy. fixes #4520

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r5708 r5761  
    195195                // Mainly for legacy -- process a From: header if it's there
    196196                if ( $name == 'From' ) {
    197                     if ( strpos( '<', $content ) !== false ) {
     197                    if ( strpos($content, '<' ) !== false ) {
    198198                        // So... making my life hard again?
    199                         $from_name = substr( $content, 0, strpos( '<', $content ) - 1 );
     199                        $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 );
    200200                        $from_name = str_replace( '"', '', $from_name );
    201201                        $from_name = trim( $from_name );
    202202
    203                         $from_email = substr( $content, strpos( '<', $content ) + 1 );
     203                        $from_email = substr( $content, strpos( $content, '<' ) + 1 );
    204204                        $from_email = str_replace( '>', '', $from_email );
    205205                        $from_email = trim( $from_email );
     
    208208                    }
    209209                } elseif ( $name == 'Content-Type' ) {
    210                     if ( strpos( ';', $content ) !== false ) {
     210                    if ( strpos( $content,';' ) !== false ) {
    211211                        list( $type, $charset ) = explode( ';', $content );
    212212                        $content_type = trim( $content_type );
Note: See TracChangeset for help on using the changeset viewer.