From: Derick Rethans Date: Thu, 23 Aug 2007 18:38:42 +0000 (+0000) Subject: - MFH: Make version_compare() also understand the lower case variant of "RC". X-Git-Tag: php-5.2.4RC3~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80b4ee9f444ef6b717bfe523461923c943b008b9;p=php - MFH: Make version_compare() also understand the lower case variant of "RC". --- diff --git a/NEWS b/NEWS index 8ea894226f..0ed8fd1576 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Aug 2007, PHP 5.2.4 +- Fixed version_compare() to support "rc" as well as "RC" for release + candidate version numbers. - Fixed bug #42368 (Incorrect error message displayed by pg_escape_string). (Ilia) - Fixed bug #42365 (glob() crashes and/or accepts way too many flags). (Jani) diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index 87f3d71163..f9070418a8 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -90,13 +90,14 @@ static int compare_special_version_forms(char *form1, char *form2) { int found1 = -1, found2 = -1; - special_forms_t special_forms[10] = { + special_forms_t special_forms[11] = { {"dev", 0}, {"alpha", 1}, {"a", 1}, {"beta", 2}, {"b", 2}, {"RC", 3}, + {"rc", 3}, {"#", 4}, {"pl", 5}, {"p", 5},