From d0bb2657827f49a40fa4281bfcbfabbc12cd3753 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Tue, 26 Jun 2007 18:06:17 +0000 Subject: [PATCH] strpos() is "haystack,needle", not "needle,haystack" Props pishmishy. fixes #4520 git-svn-id: https://develop.svn.wordpress.org/trunk@5761 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index a8fd707074..f52d5c1483 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -194,20 +194,20 @@ function wp_mail( $to, $subject, $message, $headers = '' ) { // Mainly for legacy -- process a From: header if it's there if ( $name == 'From' ) { - if ( strpos( '<', $content ) !== false ) { + if ( strpos($content, '<' ) !== false ) { // So... making my life hard again? - $from_name = substr( $content, 0, strpos( '<', $content ) - 1 ); + $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 ); $from_name = str_replace( '"', '', $from_name ); $from_name = trim( $from_name ); - $from_email = substr( $content, strpos( '<', $content ) + 1 ); + $from_email = substr( $content, strpos( $content, '<' ) + 1 ); $from_email = str_replace( '>', '', $from_email ); $from_email = trim( $from_email ); } else { $from_name = trim( $content ); } } elseif ( $name == 'Content-Type' ) { - if ( strpos( ';', $content ) !== false ) { + if ( strpos( $content,';' ) !== false ) { list( $type, $charset ) = explode( ';', $content ); $content_type = trim( $content_type ); $charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );