From 65401e0987e677fb58b878c7b3fe9316cda5f228 Mon Sep 17 00:00:00 2001 From: Jack Wright Date: Fri, 10 Nov 2017 11:21:24 +0000 Subject: [PATCH 1/2] Added null type on Request::create docblock --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 1792c9fd52923..902bff9388468 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -302,7 +302,7 @@ public static function createFromGlobals() * @param array $cookies The request cookies ($_COOKIE) * @param array $files The request files ($_FILES) * @param array $server The server parameters ($_SERVER) - * @param string $content The raw body data + * @param string|null $content The raw body data * * @return static */ From 9ef6d8c23310d8c6a5695bf7f19937f25069a8fc Mon Sep 17 00:00:00 2001 From: Jack Wright Date: Fri, 10 Nov 2017 11:31:51 +0000 Subject: [PATCH 2/2] Ran patch --- src/Symfony/Component/HttpFoundation/Request.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 902bff9388468..fe27e53e7cbe9 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -296,12 +296,12 @@ public static function createFromGlobals() * The information contained in the URI always take precedence * over the other information (server and parameters). * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) + * @param string $uri The URI + * @param string $method The HTTP method + * @param array $parameters The query (GET) or request (POST) parameters + * @param array $cookies The request cookies ($_COOKIE) + * @param array $files The request files ($_FILES) + * @param array $server The server parameters ($_SERVER) * @param string|null $content The raw body data * * @return static @@ -1748,7 +1748,7 @@ protected function prepareBaseUrl() // Does the baseUrl have anything in common with the request_uri? $requestUri = $this->getRequestUri(); - if ($requestUri !== '' && $requestUri[0] !== '/') { + if ('' !== $requestUri && '/' !== $requestUri[0]) { $requestUri = '/'.$requestUri; } @@ -1824,7 +1824,7 @@ protected function preparePathInfo() if (false !== $pos = strpos($requestUri, '?')) { $requestUri = substr($requestUri, 0, $pos); } - if ($requestUri !== '' && $requestUri[0] !== '/') { + if ('' !== $requestUri && '/' !== $requestUri[0]) { $requestUri = '/'.$requestUri; }