From d2a92aa808ca1493110a5dc508bd685e091660b2 Mon Sep 17 00:00:00 2001 From: Jamal <30111652+jamalo@users.noreply.github.com> Date: Fri, 17 Dec 2021 13:47:33 +0100 Subject: [PATCH] Fix PHP 8.1: Assign string to int propety TypeError: Cannot assign string to property flight\net\Request::$length of type int --- flight/net/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/net/Request.php b/flight/net/Request.php index d340510..68bc18b 100644 --- a/flight/net/Request.php +++ b/flight/net/Request.php @@ -147,7 +147,7 @@ final class Request 'scheme' => self::getScheme(), 'user_agent' => self::getVar('HTTP_USER_AGENT'), 'type' => self::getVar('CONTENT_TYPE'), - 'length' => self::getVar('CONTENT_LENGTH', 0), + 'length' => (int)self::getVar('CONTENT_LENGTH', 0), 'query' => new Collection($_GET), 'data' => new Collection($_POST), 'cookies' => new Collection($_COOKIE),