`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.
Premising the `queryKey` should really be a string in my limited opinion,
Interestingly, in upstream they started fixing this yesterday, with just this minimal change:
https://secure.phabricator.com/rPf6214f060e780ecf7b565c5a0edbd28d85c03275#C11580NL1139
Premising I don't like that specific patch in upstream, because I don't like counting the length of
a string just to answer the question "is this empty?".
In short, this is probably better and more readable then upstream.
Note: this may highlight other absurd input values that might be worth correctingbut premising that adopting stuff like
instead ofphutil_nonempty_string() could be too risky, we just ignodo an explicit cast to string., If phutil_nonempty_string() throws an exception in yourto answer
instance, report it to Phorge to evaluate and fix that specific corner case.
For example using `if(phutil_string_cast($v) !== '')`the question "Is this string empty?" just like it was done under the hood by the strlen function.
In short, this is probably nice and more readable than upstream (but not a competition).
Closes T15370