felipe Sun Jun 28 18:44:28 2009 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings bug48709.phpt
Modified files:
/php-src/ext/standard metaphone.c
/php-src NEWS
Log:
- MFH: Fixed bug #48709 (metaphone and 'wh')
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/metaphone.c?r1=1.28.2.1.2.8&r2=1.28.2.1.2.9&diff_format=u
Index: php-src/ext/standard/metaphone.c
diff -u php-src/ext/standard/metaphone.c:1.28.2.1.2.8
php-src/ext/standard/metaphone.c:1.28.2.1.2.9
--- php-src/ext/standard/metaphone.c:1.28.2.1.2.8 Wed Dec 31 11:17:45 2008
+++ php-src/ext/standard/metaphone.c Sun Jun 28 18:44:28 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: metaphone.c,v 1.28.2.1.2.8 2008/12/31 11:17:45 sebastian Exp $ */
+/* $Id: metaphone.c,v 1.28.2.1.2.9 2009/06/28 18:44:28 felipe Exp $ */
/*
Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern
<[email protected]>
@@ -225,15 +225,14 @@
w_idx += 2;
}
break;
- /* WH becomes H,
+ /* WH becomes W,
WR becomes R
W if followed by a vowel */
case 'W':
- if (Next_Letter == 'H' ||
- Next_Letter == 'R') {
+ if (Next_Letter == 'R') {
Phonize(Next_Letter);
w_idx += 2;
- } else if (isvowel(Next_Letter)) {
+ } else if (Next_Letter == 'H' || isvowel(Next_Letter)) {
Phonize('W');
w_idx += 2;
}
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1573&r2=1.2027.2.547.2.1574&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1573 php-src/NEWS:1.2027.2.547.2.1574
--- php-src/NEWS:1.2027.2.547.2.1573 Sun Jun 28 15:40:00 2009
+++ php-src/NEWS Sun Jun 28 18:44:28 2009
@@ -4,6 +4,7 @@
- Fixed regression in cURL extension that prevented flush of data to output
defined as a file handle. (Ilia)
+- Fixed bug #48709 (metaphone and 'wh'). (brettz9 at yahoo dot com, Felipe)
- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
formatted). (peter at lvp-media dot com, Felipe)
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug48709.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/strings/bug48709.phpt
+++ php-src/ext/standard/tests/strings/bug48709.phpt
--TEST--
Bug #48709 (metaphone and 'wh')
--FILE--
<?php
/* Initial letter exceptions */
$exceptions = array(
'kn', // Drop first letter
'gn', // ditto
'pn', // ditto
'ae', // ditto
'wr', // ditto
'x', // s
'wh', // w
'wa' // w
);
foreach ($exceptions as $letter) {
printf("%s => %s\n", $letter, metaphone($letter));
}
?>
--EXPECT--
kn => N
gn => N
pn => N
ae => E
wr => R
x => S
wh => W
wa => W
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php