Proper usage:
http://uk3.php.net/strpos
Warning
This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
So instead of in mimemail.module:
if (strpos(variable_get('smtp_library', ''), 'mimemail')
&& !function_exists('drupal_mail_wrapper')) {
it should be something like:
if (strpos(variable_get('smtp_library', ''), 'mimemail') !== FALSE
&& !function_exists('drupal_mail_wrapper')) {
Comments
Comment #1
kenorb commentedThe same in mimemail.inc:
and
and
Comment #2
kenorb commentedAnd the same in mimemail.admin.inc:
and
Comment #3
sgabe commentedThe attached patch adds the missing === and !== operators in if statements with
strpos().Changing version since the patch applies to 6.x-1.0-alpha1, and that is the latest now.
Comment #4
sgabe commentedI am attaching a new patch against 6.x-1.0-alpha2, since the one in #3 is completely wrong, because I overlooked the brackets in the statements.
Comment #5
sgabe commentedIt seems this line is wrong because of the NOT operator before strpos().
Attaching a rerolled patch against current HEAD.
Comment #6
sgabe commentedCommitted to HEAD.