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

This topic has been solved
K

Kirby

Guest
PHP:

Code:
$ips = array_merge(
    $data['ipv4s'],
    array_map(
        function ($ipv6) { return '[' . $ipv6 . ']'; },
        $data['ipv6s']
    )
);

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

PHP:

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

        [...]

        $data = [
            'scheme'...

Read more

Continue reading...