diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 7bd9231d8..fa46c2182 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -4395,7 +4395,7 @@ return [ 'HRTime\StopWatch::stop' => ['void'], 'html_entity_decode' => ['string', 'string'=>'string', 'flags='=>'int', 'encoding='=>'string'], 'htmlentities' => ['string', 'string'=>'string', 'flags='=>'int', 'encoding='=>'string', 'double_encode='=>'bool'], -'htmlspecialchars' => ['string', 'string'=>'string', 'flags='=>'int', 'encoding='=>'string', 'double_encode='=>'bool'], +'htmlspecialchars' => ['string', 'string'=>'string', 'flags='=>'int', 'encoding='=>'string|null', 'double_encode='=>'bool'], 'htmlspecialchars_decode' => ['string', 'string'=>'string', 'flags='=>'int'], 'http\Client::__construct' => ['void', 'driver='=>'string', 'persistent_handle_id='=>'string'], 'http\Client::addCookies' => ['http\Client', 'cookies='=>'?array'], diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 4236bcb9c..c4aacdf7b 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -690,7 +690,7 @@ function html_entity_decode(string $string, ?int $quote_style = null, ?string $c * : string * ) */ -function htmlspecialchars(string $string, int $flags = ENT_COMPAT | ENT_HTML401, string $encoding = 'UTF-8', bool $double_encode = true) : string {} +function htmlspecialchars(string $string, int $flags = ENT_COMPAT | ENT_HTML401, ?string $encoding = 'UTF-8', bool $double_encode = true) : string {} /** * @psalm-pure