Open alice-blue opened 2 years ago
I suspect the problem stems from the implementation of isEmpty()
:
// Determine if a value is "empty" - null, false, or an empty string
//
function isEmpty($val) {
return is_null($val) || $val == false || $val == "";
}
In PHP, 0 == false
and 0 == ""
.
An improved implementation would use strict comparisons:
return is_null($val) || $val === false || $val === "";
If this change was made, checks would need to be done to ensure it wasn't causing regressions elsewhere.
Some games have the version number "0" (for example, https://ifdb.org/viewgame?id=b3rd1mfm4zox4eic.) But when you enter "0" as the version number at IFDB, it displays "current version" on the page as "unknown."