mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-09 16:32:39 +01:00
Fix PHP 8.1 "rawurlencode(null)" exception which blocks rendering a project page
Summary: After PHP 8.1 the function `rawurlencode()` does not accept anymore the `null` value. Thus return an empty string when the input parameter is null instead of passing the input parameter to `rawurlencode()`. Closes T15263 Test Plan: Applied this change on top of D25144, D25145, D25146, D25147, D25151, D25152, D25153 and D25163 and already existing Workboard located at `/project/view/1/` finally rendered in web browser. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: avivey, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15263 Differential Revision: https://we.phorge.it/D25164
This commit is contained in:
parent
f7d5614ca1
commit
d472896226
1 changed files with 3 additions and 0 deletions
|
@ -1888,6 +1888,9 @@ function phutil_is_natural_list(array $list) {
|
|||
* @return string URI encoded string, except for '/'.
|
||||
*/
|
||||
function phutil_escape_uri($string) {
|
||||
if ($string === null) {
|
||||
return '';
|
||||
}
|
||||
return str_replace('%2F', '/', rawurlencode($string));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue