RTC bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
12 Sep 2025

Summary of Changes

@LadySolveig found and fixed an issue (thanks for that) with the HTTP-classes header handling, as they could be arrays.

As the underlying library laminas-diactotos gives us an array from the getHeaders function in the request, we also need to support this.

https://github.com/laminas/laminas-diactoros/blob/2be00db99ed3b8947fc8c36efbf21202fa28ff00/src/Request.php#L55

    /**
     * {@inheritdoc}
     */
    public function getHeaders(): array
    {
        $headers = $this->headers;
        if (
            ! $this->hasHeader('host')
            && $this->uri->getHost()
        ) {
            $headers['Host'] = [$this->getHostFromUri()];
        }

        return $headers;
    }

Same way at it is done and fixed in the Joomla! http Framework Package.

Testing instructions

Hard to test, it's streamlining the code, so I guess all the requests using the HTTP-class, like the stats collection, should still work.

@Hackwar as you implemented this in the framework, could you have a look and see if it's correct? Thanks!

avatar bembelimen bembelimen - open - 12 Sep 2025
avatar bembelimen bembelimen - change - 12 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Sep 2025
Category Libraries
avatar richard67 richard67 - change - 20 Sep 2025
Status Pending Ready to Commit
Labels Added: bug PR-5.3-dev
avatar richard67
richard67 - comment - 20 Sep 2025

RTC after 2 successful review.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46078.

avatar LadySolveig LadySolveig - change - 20 Sep 2025
Labels Added: RTC
avatar LadySolveig LadySolveig - change - 20 Sep 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-09-20 14:59:01
Closed_By LadySolveig
avatar LadySolveig LadySolveig - close - 20 Sep 2025
avatar LadySolveig LadySolveig - merge - 20 Sep 2025
avatar LadySolveig
LadySolveig - comment - 20 Sep 2025

Thanks to all involved 💚

Add a Comment

Login with GitHub to post a comment