CakePHP Inflector on certain words returns swapped letters -


i own content-management system uses cake's inflector output entries pluralization if detect there's more 1 available.

if ($amt >= 2) $object_name = inflector::pluralize($object_name); 

this works object long isn't in inflector's "irregular" list.

http://inflector.cakephp.org/the%20purple%20cow returns "the purple tows" http://inflector.cakephp.org/purple%20cow returns "purple pows" http://inflector.cakephp.org/the%20purple%20goose returns "the purple teese" http://inflector.cakephp.org/purple%20how returns "purple hows" expected

for reason it's substituting last word's first letter first word's first letter, then adding s expected.

update: cakephp bug, documented here. fixed in 2.6.5. question has been modified avoid confusion.

seems bug specific word cow in last position. "the purple hen" , "purple hen" work fine. "cow fence" works fine. "big cow" or "the big cow" reproduce bug.

i recommend looking opening ticket using guidelines here.

you'll need search existing tickets related inflector see if has been reported. there several other inflector issues, didn't find when searching term cow.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -