[BUGFIX] Ensure Uri->getQuery() always returns a string 34/58534/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 16:59:09 +0000 (18:59 +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/58534
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Http/Uri.php

index 59774d9..7f624e2 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