Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Request #18626 ALMA = 950?
Submitted: 2011-06-24 20:36 UTC
From: andrisi Assigned: doconnor
Status: Assigned Package: Numbers_Roman (version 1.0.2)
PHP Version: 5.3.6 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 30 - 28 = ?

 
 [2011-06-24 20:36 UTC] andrisi (András Kardos)
Description: ------------ "ALMA" parsed to the value of 950, though "A" is not a roman numeric letter at all. Test script: --------------- var_dump(Numbers_Roman::toNumber('ALMA')); Expected result: ---------------- 0

Comments

 [2011-09-18 13:14 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
So; Numbers_Roman::toNumber('A') produces 0; and LM is 950. Arguably this should raise an invalidargumentexceptoion or similar; but otherwise it seems to be more or less working as I'd expect. Given the package is 'stable' this kind of change would potentially break a number of implementations. Would a "isValid()" check in your code prior to calling this help?
 [2011-09-18 16:40 UTC] andrisi (András Kardos)
Thanks for getting back to this. Yes, adding an isValid() function, or even better (and faster, as only one call/check is required) an extended version of toNumber, like toNumberIfValid() would be fine!
 [2011-10-03 22:44 UTC] andrisi (András Kardos)
Daniel, do you think you'll fix this in the near future? Thanks.
 [2011-11-21 18:58 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: Open -Type: Bug +Type: Feature/Change Request
 [2011-11-21 18:59 UTC] doconnor (Daniel O'Connor)
Hey Andras, thanks for your patience. Unfortunately as you can see, I only get to swing past this package once in every now and then. If you've got a patch; I can certainly apply it; otherwise it might be a bit of time before I get to implementing this.
 [2011-11-21 19:00 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: doconnor