PHP Classes

Wrong parameter count for str_replace() in ValidateEmailAddress

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  Wrong parameter count for...  >  (Un) Subscribe thread alerts  
Subject:Wrong parameter count for...
Summary:Wrong parameter count for str_replace() in ValidateEmailAddress
Messages:2
Author:Po Cak
Date:2011-11-09 23:55:21
Update:2011-11-11 06:36:02
 

  1. Wrong parameter count for...   Reply   Report abuse  
Picture of Po Cak Po Cak - 2011-11-09 23:55:21
If I call the ValidateEmailAddress method of the class email_message_class then I get the following error:

Warning: Wrong parameter count for str_replace() in C:\...\mimemessage_1.92\email_message.php on line 1008

I think the referred line should be replaced.
old: return(preg_match('/'.str_replace('/', '\\/'. $this->email_regular_expression).'/i',$address));
new: return(preg_match('/'.str_replace('/', '\\/', $this->email_regular_expression).'/i',$address));

The difference is the period versus comma, just before $this.




  2. Re: Wrong parameter count for...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-11-11 06:36:03 - In reply to message 1 from Po Cak
Yes, that bug was just fixed and a new version was uploaded. Thank you for reporting.