Heh. From staring at the code for a little, my guess is that it is the
following snippet in wml/developer.wml's print_package_entry at fault:
The documentation for array_filter[1] says:
and if you follow the reference to the implicit boolean conversions
documentation[2], it indeed has the following:
(because Javascript isn't the only language with "helpful" design
decisions)
So, I think you have to have *every* version in the archive as "0";
later checks in that function explicitly compare against "".
It's worth noting that there's also
in the caller (print_package_entries), so if a src:0 were ever uploaded
to the archive it would feel left out of all the DDPO fun, although such
a source package name would surely be rejected...
As for the fix, you can (ab)use strlen as the callback (though of
*course* you have to pass the function name as a string...), so:
and
I use the word "fix" loosely here though, I've only convinced myself
it's correct; it has not seen an interpreter, let alone been tested on
this input!
James
[1] https://www.php.net/manual/en/function.array-filter.php#refsect1-function.array-filter-parameters
[2] https://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting