Posted by thekevinday on August 31, 2009 at 2:41pm
Jump to:
| Project: | Phone |
| Version: | 6.x-2.9 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The phone.ca.inc code does not work as is.
Looking at the file, it seems that the regex was setup as an example, but is not properly commented.
For example, the second line of the regex has:^\D* # ignore non-digits
Which means that the pound-sign and the text after it would all have to be part of the phone number!
I suspect this is an oversight, I have provided a patch that fixes the regex so that it works.
| Attachment | Size |
|---|---|
| phone-ca_fix-1.patch | 3.32 KB |
Comments
#1
New versions of PHP don't have this problem, so I am guessing that # is allowed in PCRE_EXTENDED and the fact that it didn't happen before was a PHP bug?
I am closing this.