[BUGFIX] Ensure Uri->getQuery() always returns a string 38/58538/2
authorDaniel Goerz <daniel.goerz@posteo.de>
Mon, 1 Oct 2018 14:47:47 +0000 (16:47 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 1 Oct 2018 17:21:15 +0000 (19:21 +0200)
As stated in the Interface:
If no query string is present, this method MUST return an empty string.

Resolves: #86520
Releases: master, 8.7
Change-Id: I9869af08c84262443e503c34a2c608fbc5ba4bc2
Reviewed-on: https://review.typo3.org/58538
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Http/Uri.php

index b62d08e..c84c854 100644 (file)
@@ -87,7 +87,7 @@ class Uri implements UriInterface
      * The query part of the URI without the ?
      * @var string
      */
-    protected $query;
+    protected $query = '';
 
     /**
      * The fragment part of the URI without the # before