Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ext/standard/tests/versioning/version_compare.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ foreach ($special_forms as $f1) {
test("1.0$f1", "1.0$f2");
}
}
test("1.2.", "1.2.");

print "TESTING OPERATORS\n";
foreach ($special_forms as $f1) {
foreach ($special_forms as $f2) {
Expand Down Expand Up @@ -106,6 +108,7 @@ TESTING COMPARE
1.0pl1 > 1.0rc1
1.0pl1 > 1.0
1.0pl1 = 1.0pl1
1.2. = 1.2.
TESTING OPERATORS
1.0-dev lt 1.0-dev : false
1.0-dev < 1.0-dev : false
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/versioning.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ php_version_compare(const char *orig_ver1, const char *orig_ver2)
p2 = n2 + 1;
}
}
if (compare == 0) {
if (compare == 0 && (*p1 || *p2)) {
if (n1 != NULL) {
if (isdigit(*p1)) {
compare = 1;
Expand Down
Loading