Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
From: Tim Düsterhus Date: Sun, 27 Apr 2025 20:32:44 +0000 Subject: Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Groups: php.internals Request: Send a blank email to [email protected] to get a copy of this message
Hi On 4/27/25 22:30, ignace nyamagana butera wrote:In this case the$url = Uri\WhatWg\Url::parse("/foo", ".com"); //Throws Uri\WhatWg\InvalidUrlException because of $baseUri Since parse is used shouldn't it return null instead of throwing ?$baseUri
is invalid. Since this is not expected to be an untrusted value, it makes sense to me to throw anInvalidUrlException
here. Thenull
return should only be used for an invalid$uri
. Best regards Tim Düsterhus
Thread (152 messages)
« previous | php.internals (#127208) | next » |
---|