From 6453c1a01867fc04c3718fe722501a1cfe4ae5ed Mon Sep 17 00:00:00 2001 From: sumbobyboys Date: Tue, 20 Aug 2013 17:39:59 +0200 Subject: [PATCH] Exclude little words of 'ee' to 'oo' plural transformation The plural form of 'bee' and 'fee' are not 'foo' and 'boo'. In general words smaller than 3 letters doesn't change to a 'oo' form. --- src/Symfony/Component/PropertyAccess/StringUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/PropertyAccess/StringUtil.php b/src/Symfony/Component/PropertyAccess/StringUtil.php index 354d164a05..9dc74dd2e5 100644 --- a/src/Symfony/Component/PropertyAccess/StringUtil.php +++ b/src/Symfony/Component/PropertyAccess/StringUtil.php @@ -188,7 +188,7 @@ class StringUtil } // Convert teeth to tooth, feet to foot - if (false !== ($pos = strpos($plural, 'ee'))) { + if (false !== ($pos = strpos($plural, 'ee')) && strlen($plural) > 3) { return substr_replace($plural, 'oo', $pos, 2); }