Fixed TypeError: array_merge(): Argument #1 must be of type array, bool given src/XF/Http/Reader.php:118


Well-known member
Affected version
2.2.10 PL 1
$ips = array_merge(
        function ($ipv6) { return '[' . $ipv6 . ']'; },

So $data['ipv4s'] is a bool here - this seems to happen if the name cannot be resolved using IPv4:

    public function isRequestableUntrustedUrlExtended($url, &$data = [], &$error = null)
        $ips = @gethostbynamel($parts['host']);
        if ($ips)


        $data = [
            'scheme' => $parts['scheme'],
            'host' => $parts['host'],
            'port' => $parts['port'] ?? null,
            'ipv4s' => $ips,
            'ipv6s' => array_column($ipv6s, 'ipv6')
        return true;

So in case an IPv6 resolution is successful (but IPv4 isn't) the function returns true, but ipv4s remains false (should be an empty array instead).

Btw: Why doesn't this entirely new method have a return type?
Last edited:
Yep this also has been triggered for some of our AMPXF users and we'll probably need to add some temporary error suppression for this version..
Top Bottom