ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.07k stars 327 forks source link

Fix #322 - PHP 8.1 deprecation notice in HostBlacklist URIFilter #323

Closed bytestream closed 2 years ago

bytestream commented 2 years ago

$uri->host can be null:

object(HTMLPurifier_URI)#14528 (7) {
  ["scheme"]=>
  NULL
  ["userinfo"]=>
  NULL
  ["host"]=>
  NULL
  ["port"]=>
  NULL
  ["path"]=>
  string(0) ""
  ["query"]=>
  NULL
  ["fragment"]=>
  string(3) "foo"
}

Closes #322

dunkoh commented 2 years ago

@ezyang any chance of tagging a new release with this change in it? Thank you!