Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Bug #11001 RFC822 Comments break PCRE
Submitted: 2007-05-10 15:06 UTC
From: gsnedders Assigned: davidc
Status: Closed Package: Validate (version 0.7.0)
PHP Version: 5.2.2 OS: Mac OS 10.4.9
Roadmaps: (Not assigned)    
Subscription  


 [2007-05-10 15:06 UTC] gsnedders (Geoffrey Sneddon)
Description: ------------ On PHP 5.2.2 (there is no option above for PHP 5.2.1, so I will assume that this bug is caused by PCRE 7, which is also in 5.2 CVS) preg_replace() returns an empty string when trying to strip RFC822 comments. Test script: --------------- <?php var_dump(Validate::email('example (though bad)@example.com', array('use_rfc822' => true))); ?> Expected result: ---------------- bool(true) Actual result: -------------- bool(false)

Comments

 [2007-06-17 08:51 UTC] amir (Amir Mohammad Saied)
Are you sure it returns: bool(false) ? It actually causes a Seg. Fault with mentioned PHP versions (those which are using PCRE7).
 [2007-06-17 18:49 UTC] gsnedders (Geoffrey Sneddon)
It returns (bool)false here. It causes a segfault on PHP 4.4 versions using PCRE7, though.
 [2007-08-19 13:59 UTC] doconnor (Daniel O'Connor)
Is there a related php bug filed? If so, link?
 [2008-01-06 00:59 UTC] dufuz (Helgi Þormar Þorbjörnsson)
PHP 5.2.5 and 5.2.4 got PCRE updated, think we're up to 7.3 by now, can anyone check if this still happens to them, too bad PHP 4.4.6 is the last PCRE update we have for the PHP 4 releases, tho I'm sure we can get them to release a new one if we find out that the newer PCRE update is important enough
 [2008-02-04 15:42 UTC] amir (Amir Mohammad Saied)
Works fine under 5.2.5, but I still get "Segmentation fault" using 4.4.8
 [2008-02-06 08:56 UTC] cweiske (Christian Weiske)
segfault on 4.4.7 for me, too
 [2008-02-18 00:23 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Couple of other people have confirmed it segfaults for them too on 4.4.7, I have a test case fleshed out and will try to show Derick ASAP and hopefully we can get a new 4.4 release or we just put a ignore tag on those segfaulting PHP versions so that pear doesn't install the package on those ?
 [2008-03-16 06:09 UTC] doconnor (Daniel O'Connor)
What's the latest on this? New php release? Is there a relevant php bug for this (that way we can close this, and have it addressed properly upstream)
 [2008-03-22 18:53 UTC] davidc (David Coallier)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I have just made a few changes and commited them and seems to have fixed this issue. It's in cvs so don't be shy to reopen it I cannot confirm at 200% that it's fixed. It just worked for me very nicely.