Merge pull request #18930 from MegaphoneJon/financial-156
[civicrm-core.git] / CRM / Utils / String.php
index 8ffc390096fd850f21de324560b2655eba96797b..7c0897436508acb9f83c494f343981706c3b235c 100644 (file)
@@ -944,7 +944,7 @@ class CRM_Utils_String {
     if ($lastLetter == 's' || $lastLetter == 'x' || $lastTwo == 'ch') {
       return $str . 'es';
     }
-    if ($lastLetter == 'y' && $lastTwo != 'ey') {
+    if ($lastLetter == 'y' && !in_array($lastTwo, ['ay', 'ey', 'iy', 'oy', 'uy'])) {
       return substr($str, 0, -1) . 'ies';
     }
     return $str . 's';