- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Jun 12 2023
Jun 11 2023
I suggest that, also because this is supposed to be a low-level phutil utility and probably should be as fast and simple as possible
Simply pass the Exception from mb_convert_encoding() to the UI when trying to change repo to an invalid encoding (as proposed by valerio.bozzolan)
Improve error message, use phutil_nonempty_string instead of null check
Jun 10 2023
Add PHP version check and manually remove deprecated encodings from array to hopefully avoid the unit test failure "Handling Base64 via mbstring is deprecated; use base64_encode/base64_decode instead" though that should only be an issue since PHP 8.2 according to https://php.watch/versions/8.2/mbstring-qprint-base64-uuencode-html-entities-deprecated ? What do I know. :)
Wrap three lines to be less than 80 characters
Also handle encoding aliases; Store existing encodings and encoding aliases in array keys so look up is O(1); compare new encoding against existing encodings and encoding aliases both as lower case.
Instead of this change update FileUploadConduitAPIMethod::execute() to check for a null argument, similar to how the other arguments are validated before proceeding
Add an additional null check instead of casting to string
Use null checks instead as we're not sure it's always a string
Simplify logic; use null check instead
Jun 9 2023
Jun 8 2023
For the records, I had the same experience when deleting a repository via ./bin/remove destroy rESHP for Unknown edge constant "25" (not 26 as mentioned in the task title) in downstream https://phabricator.wikimedia.org/T119588
Check for === null instead of using phutil_nonempty_string; check both $old and $new
Use a null-check instead of assuming it's a string
Simplify changes as proposed by speck
Also pass $new to phutil_nonempty_string() and not only $old.
I'm not convinced that we should check $new and $old for === null here instead of using phutil_nonempty_string(). But of course you make the final decision.
Update change to be consistent with https://we.phorge.it/D25268#change-HsYn5r9Vm2Ju