Issue Bug Closed

#86520Uri->getQuery() must never return null

Daniel Goerz 10/01/18, 16:44 updated 10/02/18, 10:26

Description

As stated in the UriInterface:

    /**
     * The query part of the URI without the ?
     * @var string
     */
    protected $query;

    /**
     * Retrieve the query string of the URI.
     *
     * If no query string is present, this method MUST return an empty string.
     *
     * [...]
     *
     * @see https://tools.ietf.org/html/rfc3986#section-2
     * @see https://tools.ietf.org/html/rfc3986#section-3.4
     * @return string The URI query string.
     */
    public function getQuery()
    {
        return $this->query;
    }

But currently on requests without a Query this method returns null

Reviews 2