diff --git a/src/future/http/status/HTTPFutureHTTPResponseStatus.php b/src/future/http/status/HTTPFutureHTTPResponseStatus.php index 44636dca..a63130fd 100644 --- a/src/future/http/status/HTTPFutureHTTPResponseStatus.php +++ b/src/future/http/status/HTTPFutureHTTPResponseStatus.php @@ -11,6 +11,8 @@ final class HTTPFutureHTTPResponseStatus extends HTTPFutureResponseStatus { array $headers, $expect = null) { + // As $body can be null (T15930), make sure this code deals with a string + $body = phutil_string_cast($body); // NOTE: Avoiding PhutilUTF8StringTruncator here because this isn't lazy // and responses may be large. if (strlen($body) > 512) {