[Tickets #12612] Re: Horde_Date: Replace simple regex with ctype_digit()
noreply at bugs.horde.org
noreply at bugs.horde.org
Sat Aug 24 18:47:06 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/12612
------------------------------------------------------------------------------
Ticket | 12612
Updated By | Michael Rubinsky <mrubinsk at horde.org>
Summary | Horde_Date: Replace simple regex with ctype_digit()
Queue | Horde Framework Packages
Version | Git master
Type | Bug
-State | Unconfirmed
+State | Feedback
Priority | 1. Low
Milestone |
Patch | 1
Owners |
------------------------------------------------------------------------------
Michael Rubinsky <mrubinsk at horde.org> (2013-08-24 18:47) wrote:
This will break with $year is not a string type. ctype_int *requires*
the input value to be typed as a string and will return unexpected
results when it is passed an integer (as the phpdoc says this method
takes).
$year must be explicitly cast to string before being passed to
ctype_int If indeed it is more efficient than to just use the simple
regex.
More information about the bugs
mailing list